Question

In: Computer Science

Convert the following hexadecimal representations of 16-bit 2’s complement binary numbers to decimal. a.FCAD b.DEAD c.1111...

Convert the following hexadecimal representations of 16-bit 2’s complement binary numbers to decimal.

a.FCAD

b.DEAD

c.1111

d.8000

e.FACE

Solutions

Expert Solution

Hexadecimal     Binary
    0           0000
    1           0001
    2           0010
    3           0011
    4           0100
    5           0101
    6           0110
    7           0111
    8           1000
    9           1001
    A           1010
    B           1011
    C           1100
    D           1101
    E           1110
    F           1111
Use this table to convert from hexadecimal to binary
a)
Converting FCAD to binary
F => 1111
C => 1100
A => 1010
D => 1101
So, in binary FCAD is 1111110010101101

since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   1111110010101101 is flipped to 0000001101010010
II. Add 1 to above result
0000001101010010 + 1 = 0000001101010011
III. Now convert this result to decimal value
=> 1101010011
=> 1x2^9+1x2^8+0x2^7+1x2^6+0x2^5+1x2^4+0x2^3+0x2^2+1x2^1+1x2^0
=> 1x512+1x256+0x128+1x64+0x32+1x16+0x8+0x4+1x2+1x1
=> 512+256+0+64+0+16+0+0+2+1
=> 851
Answer: -851

b)
Converting DEAD to binary
D => 1101
E => 1110
A => 1010
D => 1101
So, in binary DEAD is 1101111010101101

since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   1101111010101101 is flipped to 0010000101010010
II. Add 1 to above result
0010000101010010 + 1 = 0010000101010011
III. Now convert this result to decimal value
=> 10000101010011
=> 1x2^13+0x2^12+0x2^11+0x2^10+0x2^9+1x2^8+0x2^7+1x2^6+0x2^5+1x2^4+0x2^3+0x2^2+1x2^1+1x2^0
=> 1x8192+0x4096+0x2048+0x1024+0x512+1x256+0x128+1x64+0x32+1x16+0x8+0x4+1x2+1x1
=> 8192+0+0+0+0+256+0+64+0+16+0+0+2+1
=> 8531
Answer: -8531

c)
Converting 1111 to binary
1 => 0001
1 => 0001
1 => 0001
1 => 0001
So, in binary 1111 is 0001000100010001

since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 1000100010001
=> 1x2^12+0x2^11+0x2^10+0x2^9+1x2^8+0x2^7+0x2^6+0x2^5+1x2^4+0x2^3+0x2^2+0x2^1+1x2^0
=> 1x4096+0x2048+0x1024+0x512+1x256+0x128+0x64+0x32+1x16+0x8+0x4+0x2+1x1
=> 4096+0+0+0+256+0+0+0+16+0+0+0+1
=> 4369
Answer: 4369

d)
Converting 8000 to binary
8 => 1000
0 => 0000
0 => 0000
0 => 0000
So, in binary 8000 is 1000000000000000

since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   1000000000000000 is flipped to 0111111111111111
II. Add 1 to above result
0111111111111111 + 1 = 1000000000000000
III. Now convert this result to decimal value
=> 1000000000000000
=> 1x2^15+0x2^14+0x2^13+0x2^12+0x2^11+0x2^10+0x2^9+0x2^8+0x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0
=> 1x32768+0x16384+0x8192+0x4096+0x2048+0x1024+0x512+0x256+0x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1
=> 32768+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
=> 32768
Answer: -32768

e)
Converting FACE to binary
F => 1111
A => 1010
C => 1100
E => 1110
So, in binary FACE is 1111101011001110

since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   1111101011001110 is flipped to 0000010100110001
II. Add 1 to above result
0000010100110001 + 1 = 0000010100110010
III. Now convert this result to decimal value
=> 10100110010
=> 1x2^10+0x2^9+1x2^8+0x2^7+0x2^6+1x2^5+1x2^4+0x2^3+0x2^2+1x2^1+0x2^0
=> 1x1024+0x512+1x256+0x128+0x64+1x32+1x16+0x8+0x4+1x2+0x1
=> 1024+0+256+0+0+32+16+0+0+2+0
=> 1330
Answer: -1330




Related Solutions

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
write a python code to Determine the binary and decimal representations of the following hexadecimal numbers....
write a python code to Determine the binary and decimal representations of the following hexadecimal numbers. Store answers in the appropriate variables in the .py file. (a) 0xfca1 (b) 0xc4d8
(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)
Convert the following numbers to 8-bit binary and 8-bit hexadecimal: a) 20 b) 78 c) -25...
Convert the following numbers to 8-bit binary and 8-bit hexadecimal: a) 20 b) 78 c) -25 d) -96 Convert the following hexadecimal numbers to binary and decimal assuming two's compliment format: a) 0x56 b) 0x14 c) 0xF8 d) 0xCC MUST DO ALL PROBLEMS AND SHOW ALL WORK!!!!
1.convert the following numbers from decimal to binary assuming seven-bit twe's complement binary representation: a)49 b)...
1.convert the following numbers from decimal to binary assuming seven-bit twe's complement binary representation: a)49 b) -27 c)0 d) -64 e) -1 f) -2 g) what is the range for this computer as written in binary and in decimal? 2.convert the following numbers from decimal to binary assuming nine-bit twe's complement binary representation: a)51 b) -29 c) -2 d)0 e) -256 f) -1 g ) what is the range for this computer as written in binary and in decimal?
Convert a list of decimal numbers into their binary and hexadecimal equivalents Add the elements of...
Convert a list of decimal numbers into their binary and hexadecimal equivalents Add the elements of each of these lists to generate a total sum Print the lists, and the total sum of each value C++ contains some built-in functions (such as itoa and std::hex) which make this assignment trivial. You may NOT use these in your programs. You code must perform the conversion through your own algorithm. The input values are: 5 9 24 2 39 83 60 8...
(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.
7 – For the following operations: • write the operands as 4-bit 2's complement binary numbers,...
7 – For the following operations: • write the operands as 4-bit 2's complement binary numbers, • perform the operation shown, • show all work in binary operating on 4-bit numbers, and • identify overflow if necessary. a) 4 + 2 b) 4 – 2 c) 2 – 4 d) 4 + 4
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...
(6 marks- 3 marks each) The following hexadecimal values are shorthand for 16-bit two’s complement binary...
(6 marks- 3 marks each) The following hexadecimal values are shorthand for 16-bit two’s complement binary numbers. Working purely in hex, negate each and then state whether the result is positive or negative. (a) 5E91 (b) D00F 2.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT