Khác biệt giữa các bản “Thành viên:Nhiêu Lộc/Sandbox”

_________________________________________________________________________ <br>
===continued…===
The next five questions dealt with converting binary to hex. We're going to use much the same method in solving these questions, but this point bears repeating: Make sure to answer the question in the format that Cisco is asking for on your exams. <p>
_________________________________________________________________________ <br>
16. Convert the following binary string to hex: 00110011 <p>
First, we'll convert the binary string to decimal: <p>
{| border="1"
| 128 || 64 || 32 || 16 || 8 || 4 || 2 || 1 || Decimal
|- || || || || || || || ||
| 0 || 0 || 1 || 1 || 0 || 0 || 1 || 1 || 51
|}
To finish answering the question, convert the decimal 51 to hex. Are there any units of 256 in the decimal 51? No. Are there any units of 16 in the decimal 51? Yes, three, for a total of 48 and a remainder of three. Three units of one give us the hex number "33". <p>
{| border="1"
| 256 || 16 || 1
|- || ||
| 0 || 3 || 3
|}
 
_________________________________________________________________________<br>
17. Convert the following binary string to hex: 11001111 <p>
First, we'll convert the binary string to decimal: <p>
{| border="1"
| 128 || 64 || 32 || 16 || 8 || 4 || 2 || 1 || Decimal
|- || || || || || || || ||
| 1 || 1 || 0 || 0 || 1 || 0 || 1 || 1 || 207
|}
Now convert the decimal 207 to hex. Are there any units of 256 in the decimal 207? No. Are there any units of 16 in the decimal 207? Yes, twelve of them, for a total of 192 and a remainder of 15. Twelve is represented in hex with the letter "c". Fifteen units of one are expressed with the letter "f", giving us a hex number of "cf". <p>
{| border="1"
| 256 || 16 || 1
|- || ||
| 0 || c || f
|}
 
_________________________________________________________________________<br>
18. Convert the following binary string to hex: 01011101 <p>
First, convert the binary string to decimal: <p>
{| border="1"
| 128 || 64 || 32 || 16 || 8 || 4 || 2 || 1 || Decimal
|- || || || || || || || ||
| 0 || 1 || 0 || 1 || 1 || 1 || 0 || 1 || 93
|}
Now convert the decimal 93 to hex. There are no units of 256, obviously. How many units of 16 are there? Five, for a total of 80 and a remainder of 13. We express the number 13 in hex with the letter "d". The final result is the hex number "5d". <p>
{| border="1"
| 256 || 16 || 1
|- || ||
| 0 || 5 || d
|}
 
_________________________________________________________________________<br>
19. Convert the following binary string to hex: 10011101 <p>
As always, convert the binary string to decimal first: <p>
{| border="1"
| 128 || 64 || 32 || 16 || 8 || 4 || 2 || 1 || Decimal
|- || || || || || || || ||
| 1 || 0 || 0 || 1 || 1 || 1 || 0 || 1 || 157
|}
Now convert the decimal 157 to hex. There are no units of 256. How many units of 16 are there in the decimal 157? Nine, for a total of 144 and a remainder of 13. You know to express the number 13 in hex with the letter "d", resulting in a hex number of “9d". <p>
{| border="1"
| 256 || 16 || 1
|- || ||
| 0 || 9 || d
|}
 
________________________________________________________________________<br>
20. Convert the following binary string to hex: 11010101 <p>
First, convert the binary string to decimal: <p>
{| border="1"
| 128 || 64 || 32 || 16 || 8 || 4 || 2 || 1 || Decimal
|- || || || || || || || ||
| 1 || 1 || 0 || 1 || 0 || 1 || 0 || 1 || 213
|}
Now convert the decimal 213 to hex. No units of 256, but how many of 16? Thirteen of them, with a total of 208 and a remainder of 5. Again, the number 13 in hex is represented with the letter "d", and the five units of one give us the hex number "d5". <p>
{| border="1"
| 256 || 16 || 1
|- || ||
| 0 || d || 5
|}