Hex and binary conversion

Binary: 0,1

Octal: 6,7

Decimal: 0,1,2,3,4,5,6,7,8,9

Hex: 0,1,2,3,4,5,6,7,8,9, A, B, C, D, E, F

 

Computer devices use binary, since only the binary 0 and 1, can easily represent the two states in the circuit, the machine can easily be identified.

Hex may correspond to a 4-bit binary number, hexadecimal binary to represent more convenient, two-digit hexadecimal just can represent a byte. So modern computer commonly used in hexadecimal.

 

4 representative of a binary hexadecimal, correspond to the following

0 1 2 3 4 5 6 7
0000 0001 0010 0011 0100 0101 0110 0111

 

 

8 9 A B C D E F
1000 1001 1010 1011 1100 1101 1110 1111

 

 

 

Making hex and binary conversion, convert each hexadecimal into 4-bit binary to

A4 -> 1010 0100

And converted to binary hexadecimal 4 is divided into a set of converted into a hexadecimal can, the absence of zero padding

11101 -> 0001 1101 -> 1D

 

Guess you like

Origin www.cnblogs.com/mowl/p/11912034.html