Question

In: Computer Science

Part 2: Signed values: Convert each as indicated. 8. Decimal to Hexadecimal (1 byte, one's complement)...

Part 2: Signed values: Convert each as indicated.

8. Decimal to Hexadecimal (1 byte, one's complement)

     a. -18

     b. -41

Solutions

Expert Solution

a. -18
Decimal to binary:
-------------------
Write down the decimal number and continually divide by 2 to give a result and a remainder. The remainder is either a 1 or a 0.
18 /  2  result 9  remainder  0
9  /  2  result 4  remainder  1
4  /  2  result 2  remainder  0
2  /  2  result 1  remainder  0
1  /  2  result 0  remainder  1
Read the remainders from bottom to top.
( 18 )10 = ( 10010 )2
Prepend zeros ro make it 8 bit.
( 18 )10 = ( 00010010 )2

Ones complement = Inverts bits in binary = 11101101
Twos complement = Ones complement + 1 = 11101101 + 1 = 11101110

Binary to hexa decimal:
------------------------
Convert each 4 bits to its hexa decimal.
1110 in hexa decimal is E
So, 11101110 in hexa decimal = EE

Answer: (EE)16

******************************

b. -41
Decimal to binary:
-------------------
Write down the decimal number and continually divide by 2 to give a result and a remainder. The remainder is either a 1 or a 0.
41 /  2  result 20 remainder  1
20 /  2  result 10 remainder  0
10 /  2  result 5  remainder  0
5  /  2  result 2  remainder  1
2  /  2  result 1  remainder  0
1  /  2  result 0  remainder  1
Read the remainders from bottom to top.
( 41 )10 = ( 101001 )2
Prepend zeros ro make it 8 bit.
( 41 )10 = ( 00101001 )2

Ones complement = Inverts bits in binary = 11010110
Twos complement = Ones complement + 1 = 11010110 + 1 = 11010111

Binary to hexa decimal:
------------------------
Convert each 4 bits to its hexa decimal.
1101 in hexa decimal is D
0111 in hexa decimal is 7
So, 11010111 in hexa decimal = D7

Answer: (D7)16

Related Solutions

Part 2: Signed values: Convert each as indicated. 7. Decimal to Hexadecimal (1 byte, signed magnitude)...
Part 2: Signed values: Convert each as indicated. 7. Decimal to Hexadecimal (1 byte, signed magnitude)      a. -18      b. -41
Convert the following binary values to hexadecimal and decimal (1 pt each) Write Hex Numbers as...
Convert the following binary values to hexadecimal and decimal (1 pt each) Write Hex Numbers as 0x##(ex 0x0A, 0xFF) Binary Hexadecimal Decimal 0001-1011 0x 0000-1000 0000-0100 0000-1001 0001-1111 1001-1001 0111-1010 1100-0010 1110-0101 1000-1010 0011-0100 0001-1001 0100-0011 1111-1111 1110-0111 0001-0010 0100-1000 0100-1110 1001-0001 0110-1100 Name: Convert the following hexadecimal values to binary and decimal Write binary numbers as 0000-0000 Hexadecimal Binary Decimal 0xf1 0xac 0x56 0x6c 0x32 0x30 0x05 0x28 0xf0 0x07 0x42 0xb9 0x6d 0x2f 0x71 0x0e 0x2d 0xfb 0xba...
(a) Convert the decimal numbers, 70 and -26 to binary in the signed 2’s complement system....
(a) Convert the decimal numbers, 70 and -26 to binary in the signed 2’s complement system. Make sure there are enough digits in the results to be able to perform arithmetic operations with these two numbers. (b) Perform in the signed 2’s complement system, (+70) + (-26) (c) Perform in the signed 2’s complement system, (-70) - (-26) (d) Perform in the signed 2’s complement system, (+70) + (+26)
if hexadecimal number FF16 represent a signed number in one's compliments, what the decimal representation of...
if hexadecimal number FF16 represent a signed number in one's compliments, what the decimal representation of that number? include the sign for that number with no spaces between the number and sign. for example -3 or +3
Convert the following decimal numbers to 16-bit 2’s complement binary. Display your result in hexadecimal. a.3030...
Convert the following decimal numbers to 16-bit 2’s complement binary. Display your result in hexadecimal. a.3030 b.404 c.5050 d.-5050 e.-20000 Show work with steps
Convert decimal +47 and +31 to binary, using the signed-2’s-complement representation and enough digits to accommodate...
Convert decimal +47 and +31 to binary, using the signed-2’s-complement representation and enough digits to accommodate the numbers. Then perform the binary equivalent of (+31)+(-47), (-31)+(+47), and (-31)+(-47). Convert the answers back to decimal and verify that they are correct.
(16%) Convert decimal +47 and +38 to binary, using the signed-2’s-complement representation and enough digits to...
(16%) Convert decimal +47 and +38 to binary, using the signed-2’s-complement representation and enough digits to accommodate the numbers, Then, perform the binary equivalent of (+47)+(-38) and (-47)+(-38) using addition. Convert the answers back to decimal and verify that they are correct.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT