Digital Circuits/Binary Systems
In order to convert from decimals to binary number, you must think in powers of 2. 1111= 15= 2 power 3 + 2 power 2+ 2 power 1 + 2 power 0 = 8+4+2+1=15. 2 power 5 = 32. to represent 31 in binary = 11111= 2 power 4 plus 15 as described above. Remember, the first digit is 2 power zero, which equals to one.
Number Base Conversions
as par role
Octal and Hexadecimal Numbers
Binary is the intrinsic number system of digital circuits, but long strings of 1s and 0s are not easy for humans to read and write. Therefore, number systems with easy conversion to and from binary were developed, including octal and hexadecimal.
The octal number system is base 8, in contrast to our native number system (decimal) which is base 10. In base 8, only the numbers 0 through 7 are used. Each octal digit can be represented by three binary bits, as shown in the conversion table above (under Binary Numbers).
Conversion between octal and binary is straightforward. To convert from octal to binary, convert each octal digit to its three-bit equivalent, and vice versa.
Similarly, the hexadecimal number system, base 16, facilitates easy conversion to and from binary. Each hexadecimal digit represents exactly four binary bits, as shown in the table above.
Note that in hexadecimal, the letters A through F are used to represent the decimal equivalent of 10 through 15, respectively.
Long strings of bits can be represented in a much more compact fashion using octal and hexadecimal. Of the two, hexadecimal is more commonly used. As each hexadecimal digit represents four bits, hexadecimal is well-suited to represent values likely to be found in modern systems (16, 32 or 64 bits). Hexadecimal values are often prefixed with the expression "0x" - for instance, 0xFF is the hexadecimal equivalent of 255.
Binary codes. Used are 8 and 2
AB78 (hexadecimal) = 1010 1011 0111 1000 (binary)
1F1F (hexadecimal)=0001 1111 0001 1111 (binary)