write a LC3 assembly language program to (a) read in a
hexadecimal number, (b) convert the number to a 16-bit binary number, and, (c) display the
16-bit binary number. It should be assumed that (a) the number entered by the user is a valid
unsigned hexadecimal number consisting of at least one hexadecimal digit and at most four
hexadecimal digits, (b) the hexadecimal number is within range [0 .. 0x7FFF], and, (c) the
hexadecimal digits entered by the user come from set {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E,
F}. The example below shows some screenshots of the execution of the program.
Ben_13
0
Newbie Poster
Recommended Answers
Jump to PostAnd?
Nobody is doing your homework for you here. Post some code, show us what you've done, tell us where you are stuck and then, only then, will we try and help you...
Jump to Postevery hex character is a 4 character binary number
1 = 0001
2 = 0010
9 = 1001
f = 1111
f29 therefore is 111100101001
create an array 1-f as key, 0000 to 1111 as value
match each hex character sequentially , as key, to output the coresponding value
All 5 Replies
happygeek
2,411
Most Valuable Poster
Team Colleague
Featured Poster
Ben_13
0
Newbie Poster
Ben_13
0
Newbie Poster
almostbob
866
Retired: passive income ROCKS
almostbob
866
Retired: passive income ROCKS
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.