In: Computer Science
1. Convert to binary and hexadecimal (PLEASE SHOW WORK)
a. 35
- binary:
- hexadecimal:
b. 85
- binary:
- hexadecimal:
c. 128
- binary:
- hexadecimal:
d. 4563
- binary:
- hexadecimal:
a. 35 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. 35 / 2 result 17 remainder 1 17 / 2 result 8 remainder 1 8 / 2 result 4 remainder 0 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. ( 35 )10 = ( 100011 )2 Prepend zeros to make it 8-bit ( 35 )10 = ( 00100011 )2 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 Split 8-bit binary to 2 halves then Use above table to convert 4 bit binary to hex values 0010 in hex is 2 0011 in hex is 3 Answer in hex is (23)16 - binary: 100011 - hexadecimal: 23 ============================= b. 85 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. 85 / 2 result 42 remainder 1 42 / 2 result 21 remainder 0 21 / 2 result 10 remainder 1 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. ( 85 )10 = ( 1010101 )2 Prepend zeros to make it 8-bit ( 85 )10 = ( 01010101 )2 Split 8-bit binary to 2 halves then Use above table to convert 4 bit binary to hex values 0101 in hex is 5 0101 in hex is 5 Answer in hex is (55)16 - binary: 1010101 - hexadecimal: 55 ============================= c. 128 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. 128 / 2 result 64 remainder 0 64 / 2 result 32 remainder 0 32 / 2 result 16 remainder 0 16 / 2 result 8 remainder 0 8 / 2 result 4 remainder 0 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. ( 128 )10 = ( 10000000 )2 Split 8-bit binary to 2 halves then Use above table to convert 4 bit binary to hex values 1000 in hex is 8 0000 in hex is 0 Answer in hex is (80)16 - binary: 10000000 - hexadecimal: 80 ============================= d. 4563 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. 4563 / 2 result 2281 remainder 1 2281 / 2 result 1140 remainder 1 1140 / 2 result 570 remainder 0 570 / 2 result 285 remainder 0 285 / 2 result 142 remainder 1 142 / 2 result 71 remainder 0 71 / 2 result 35 remainder 1 35 / 2 result 17 remainder 1 17 / 2 result 8 remainder 1 8 / 2 result 4 remainder 0 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. ( 4563 )10 = ( 1000111010011 )2 Prepend zeros to make it 16-bit ( 4563 )10 = ( 0001000111010011 )2 Split 8-bit binary to 2 halves then Use above table to convert 4 bit binary to hex values 0001 in hex is 1 0001 in hex is 1 1101 in hex is D 0011 in hex is 3 Answer in hex is (11D3)16 - binary: 1000111010011 - hexadecimal: 11D3