Binary 0: Any voltage between 0V to 0.8V
Not used: Voltage between 0.8V to 2V in 5 Volt CMOS and TTL Logic, this may cause error in a digital circuit. Today's digital circuits works at 1.8 volts, so this statement may not hold true for all logic circuits.
We can see another significant difference between digital and analog systems. In digital systems, the exact voltage value is not important; eg, a voltage of 3.6V means the same as a voltage of 4.3V. In analog systems, the exact voltage value is important.
The binary number system is the most important one in digital systems, but several others are also important. The decimal system is important because it is universally used to represent quantities outside a digital system. This means that there will be situations where decimal values have to be converted to binary values before they are entered into the digital system.
In additional to binary and decimal, two other number systems find wide-spread applications in digital systems. The octal (base-8) and hexadecimal (base-16) number systems are both used for the same purpose- to provide an efficient means for representing large binary system.
The octal number system has a base of eight, meaning that it has eight possible digits: 0,1,2,3,4,5,6,7.
83 | 82 | 81 | 80 | | 8-1 | 8-2 | 8-3 |
=512 | =64 | =8 | =1 | . | =1/8 | =1/64 | =1/512 |
Most Significant Digit | | | | Octal point | | | Least Significant Digit |
Octal to Decimal Conversion
- 2378 = 2 x (82) + 3 x (81) + 7 x (80) = 15910
- 24.68 = 2 x (81) + 4 x (80) + 6 x (8-1) = 20.7510
- 11.18 = 1 x (81) + 1 x (80) + 1 x (8-1) = 9.12510
- 12.38 = 1 x (81) + 2 x (80) + 3 x (8-1) = 10.37510
The hexadecimal system uses base 16. Thus, it has 16 possible digit symbols. It uses the digits 0 through 9 plus the letters A, B, C, D, E, and F as the 16 digit symbols.
163 | 162 | 161 | 160 | | 16-1 | 16-2 | 16-3 |
=4096 | =256 | =16 | =1 | . | =1/16 | =1/256 | =1/4096 |
Most Significant Digit | | | | Hexa Decimal point | | | Least Significant Digit |
Hexadecimal to Decimal Conversion
- 24.616 = 2 x (161) + 4 x (160) + 6 x (16-1) = 36.37510
- 11.116 = 1 x (161) + 1 x (160) + 1 x (16-1) = 17.062510
- 12.316 = 1 x (161) + 2 x (160) + 3 x (16-1) = 18.187510
Converting from one code form to another code form is called code conversion, like converting from binary to decimal or converting from hexadecimal to decimal.
Binary-To-Decimal Conversion
Any binary number can be converted to its decimal equivalent simply by summing together the weights of the various positions in the binary number which contain a 1.
Binary | Decimal |
110112 |
|
24+23+01+21+20 | =16+8+0+2+1 |
Result | 2710 |
Binary | Decimal |
101101012 |
|
27+06+25+24+03+22+01+20 | =128+0+32+16+0+4+0+1 |
Result | 18110 |
You should have noticed that the method is to find the weights (i.e., powers of 2) for each bit position that contains a 1, and then to add them up.
Decimal-To-Binary Conversion
There are 2 methods:
- Reverse of Binary-To-Decimal Method
- Repeat Division
Decimal | Binary |
4510 | =32 + 0 + 8 + 4 +0 + 1 |
| =25+0+23+22+0+20 |
Result | =1011012 |
Repeat Division-Convert decimal to binary
This method uses repeated division by 2.
Convert 2510 to binary
Division | Remainder | Binary |
25/2 | = 12+ remainder of 1 | 1 (Least Significant Bit) |
12/2 | = 6 + remainder of 0 | 0 |
6/2 | = 3 + remainder of 0 | 0 |
3/2 | = 1 + remainder of 1 | 1 |
1/2 | = 0 + remainder of 1 | 1 (Most Significant Bit) |
Result | 2510 | = 110012 |
Binary-To-Octal / Octal-To-Binary Conversion
Octal Digit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
Binary Equivalent | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 |
Each Octal digit is represented by three binary digits.
Example:
100 111 0102 = (100) (111) (010)2 = 4 7 28
No comments:
Post a Comment