Question

In: Computer Science

Convert the following numbers from decimal to hexadecimal (and for each, indicate how many bytes would...

Convert the following numbers from decimal to hexadecimal (and for each, indicate how many bytes would be needed to store the value of that number):

10
15
16
256
250
358
1024
1023
8195

Solutions

Expert Solution

a) 10
Divide 10 successively by 16 until the quotient is 0
10/16 = 0, remainder is 10
Read remainders from the bottom to top as A
Answer: 0xA
Number of bytes required = 1

b) 15
Divide 15 successively by 16 until the quotient is 0
15/16 = 0, remainder is 15
Read remainders from the bottom to top as F
Answer: 0xF
Number of bytes required = 1

c) 16
Divide 16 successively by 16 until the quotient is 0
16/16 = 1, remainder is 0
1/16 = 0, remainder is 1
Read remainders from the bottom to top as 10
Answer: 0x10
Number of bytes required = 1

d) 256
Divide 256 successively by 16 until the quotient is 0
256/16 = 16, remainder is 0
16/16 = 1, remainder is 0
1/16 = 0, remainder is 1
Read remainders from the bottom to top as 100
Answer: 0x100
Number of bytes required = 2

e) 250
Divide 250 successively by 16 until the quotient is 0
250/16 = 15, remainder is 10
15/16 = 0, remainder is 15
Read remainders from the bottom to top as FA
Answer: 0xFA
Number of bytes required = 1

f) 358
Divide 358 successively by 16 until the quotient is 0
358/16 = 22, remainder is 6
22/16 = 1, remainder is 6
1/16 = 0, remainder is 1
Read remainders from the bottom to top as 166
Answer: 0x166
Number of bytes required = 2

g) 1024
Divide 1024 successively by 16 until the quotient is 0
1024/16 = 64, remainder is 0
64/16 = 4, remainder is 0
4/16 = 0, remainder is 4
Read remainders from the bottom to top as 400
Answer: 0x400
Number of bytes required = 2

h) 1023
Divide 1023 successively by 16 until the quotient is 0
1023/16 = 63, remainder is 15
63/16 = 3, remainder is 15
3/16 = 0, remainder is 3
Read remainders from the bottom to top as 3FF
Answer: 0x3FF
Number of bytes required = 2

i) 8195
Divide 8195 successively by 16 until the quotient is 0
8195/16 = 512, remainder is 3
512/16 = 32, remainder is 0
32/16 = 2, remainder is 0
2/16 = 0, remainder is 2
Read remainders from the bottom to top as 2003
Answer: 0x2003
Number of bytes required = 2



Related Solutions

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...
Q1: Translate the following Bytes to Decimal and Hexadecimal a) 00001001 b) 111111111 c) 11101110 d)...
Q1: Translate the following Bytes to Decimal and Hexadecimal a) 00001001 b) 111111111 c) 11101110 d) 01010101
Convert these numbers from Decimal to Binary 111: 66: 252 11 20 Convert these numbers from...
Convert these numbers from Decimal to Binary 111: 66: 252 11 20 Convert these numbers from Binary to Decimal 00110110 11111000 00000111 10101010 What is the Default Subnet mask of Class A IPV4 What is the Default Subnet mask of Class B IPV4 What is the Default Subnet mask of Class C IPV4 What is the CIDR notation or / short handwriting of Subnet masks: Class A: /?. Explain the reason Class B: /? Explain the reason Class C: /?...
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
With a detailed step-by-step process, convert the following decimal number into binary, Hexadecimal and IEEE 754...
With a detailed step-by-step process, convert the following decimal number into binary, Hexadecimal and IEEE 754 formats : 72.nn ( where nn is 80)
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
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
Add the following BCD numbers, and convert the obtained BCD result into the corresponding decimal, and...
Add the following BCD numbers, and convert the obtained BCD result into the corresponding decimal, and then convert the decimal result into the corresponding binary, then compare the number of bits required for binary with that required for BCD. (1) 0111 + 0101 (2) 1001 + 0111 (3) 01010001 + 01011000 (4) 010101100001 + 011100001000
Write a program in C++ that converts decimal numbers to binary, hexadecimal, and BCD. You are...
Write a program in C++ that converts decimal numbers to binary, hexadecimal, and BCD. You are not allowed to use library functions for conversion. The output should look exactly as follows: DECIMAL      BINARY                     HEXDECIMAL                      BCD 0                      0000 0000                   00                                            0000 0000 0000 1                      0000 0001                   01                                            0000 0000 0001 2                      0000 0010                   02                                            0000 0000 0010 .                       .                                   .                                               . .                       .                                   .                                               . 255                  1111 1111                   FF                                            0010 0101 0101
For the following factorial designs, indicate how many cells would be created, and then indicate how...
For the following factorial designs, indicate how many cells would be created, and then indicate how many main effects and interactions you would look for. a. 3 x 2 design b. 3 x 4 x 2 design c. 2 x 2 x 2 x 2 design Dovidio & Gaertner (2000) told students to make hiring recommendations for potential job candidates. Students read one application for a job from a fake candidate, recommending the candidate for the job (or not). The...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT