In: Computer Science
SUBJECT: CYBER ESSENTIALS
Convert between binary and hexadecimal values
Question 7: Convert binary number to a hexadecimal number |
Binary number: 00001100 |
Hexadecimal value: ?? |
Question 8: Convert binary number to a hexadecimal number |
Binary number: 01001111 |
Hexadecimal value: ?? |
Question 9: Convert binary number to a hexadecimal number |
Binary number: 10101101 |
Hexadecimal value: ?? |
Question 10: Convert hexadecimal number to an 8 bit binary number |
Hexadecimal number: AB |
8 bit binary number: |
Question 11: Convert hexadecimal number to an 8 bit binary number |
Hexadecimal number: D2 |
8 bit binary number: ?????????? |
Question 12: Convert hexadecimal number to an 8 bit binary number |
Hexadecimal number: 01 |
8 bit binary number: ?????????? |
Part 3: ASCII Code (10 points)
Question 13: What character is the hexadecimal ASCII code 23? |
Question 14: What character is the hexadecimal ASCII code 4A? |
Question 15: What character is the hexadecimal ASCII code 6A? |
Part 4: Converting numbers to binary (20 points)
Question 16: For each scenario determine if the numbers should be stored as ASCII codes or binary equivalents. Then find the ASCII code or calculate the binary equivalent.
Scenario |
ASCII code |
Binary equivalent |
The course number: 107 |
||
The year: 2001 |
||
The number of printers in inventory: 62 |
||
The weight of a suitcase when it is checked in at the airport: 24 |
Question 17: Explain your reason for each of the choices in the previous question.
Scenario |
Binary equivalent |
The course number: 107 |
|
The year: 2001 |
|
The number of printers in inventory: 62 |
|
The weight of a suitcase when it is checked in at the airport: 24 |
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 binary to hexadecimal 7) Converting 00001100 to hexadecimal 0000 => 0 1100 => C So, in hexadecimal 00001100 is 0x0C 8) Converting 01001111 to hexadecimal 0100 => 4 1111 => F So, in hexadecimal 01001111 is 0x4F 9) Converting 10101101 to hexadecimal 1010 => A 1101 => D So, in hexadecimal 10101101 is 0xAD 10) Converting AB to binary A => 1010 B => 1011 So, in binary AB is 10101011 11) Converting D2 to binary D => 1101 2 => 0010 So, in binary D2 is 11010010 12) Converting 01 to binary 0 => 0000 1 => 0001 So, in binary 01 is 00000001