Consider the instruction formats of the basic computer and t

Consider the instruction formats of the basic computer and the list of instructions. For each of the following 16-bit instructions, given the equivalent four-digit hexadecimal code and explain in your own words what it is that the instruction is going to perform.

a) 1001 0000 1110 0110

b) 0011 1001 1100 1010

Solution

Given that binary code and our task is convert that binary code into hexa decimal code.

For that purpose we split the 16 bits into 4 parts and each par contain 4 bits

a) 1001 0000 1110 0110

we go from left to right

0110- 2^3 * 0 + 2^2 *1 + 2^1 * 1+ 2^0 * 0 so we get 6 as the answer

in this way we can convert all four parts

1110 - 14 so 14 is written as E in Hexadecimal code

0000 - 0

1001 - 9

so answer for first question is

Binary code: 1001 0000 1110 0110

Hexa decimal code: 9 0 E 6

b) 0011 1001 1100 1010

0011 - 3

1001 - 9

1100 - 12 in binary code so 12 is written as C in hexa decimal code

1010 - 10 in binary code and 10 is written as A in hexa decimal code

Binary code: 0011 1001 1100 1010

Hexa decimal code: 3 9 C A

Consider the instruction formats of the basic computer and the list of instructions. For each of the following 16-bit instructions, given the equivalent four-di

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site