Computer Number Systems & Digital Devices By: Sohaib Rehman
Computer Number Systems & Digital Devices By: Sohaib Rehman
5 3 4 6 . 7 2 103 102 101 100 10-1 10-2 This tells you that you have 5 thousands, 3 hundreds, 4 tens, 6 ones, 7 tenths and 2 hundredths.
1 24
0 23
1 22
1 21
0 20
1 2-1
1 2-2
just add these up. The binary number 101, represents (1 * 22) + (0 * 21) + (1 * 20) 4 +0 + 1 = 5 ( Decimal) What is the decimal equivalent for 10110.11 ?
Binary Conversion
22710 = ?
10910 = ? Conversion from decimal to binary is a simple
Hexadecimal
Computer require binary digits, so why use hexadecimal? Example shows the digit values for hexadecimal which is often called hex.
162 256
161 16
160 1
Hexadecimal
Dec
0 1 2 3 4 5 6 7 = = = = = = = =
Hex
0 1 2 3 4 5 6 7
Dec
8 9 10 11 12 13 14 15 = = = = = = = =
Hex
8 9 A B C D E F
Binary-Coded Decimals
In applications such as frequency counters, digital voltmeters, or calculators, where the output is a decimal display, a BCD code is
often used. BCD uses a 4-bit binary code to represent each decimal digit in a number. The simplest BCD code uses the first 10 numbers of standard binary code for the BCD numbers 0 through 9.
Binary-Coded Decimals
The Hexadecimals codes A through F are invalid BCD codes.
To convert a decimal number to its BCD
equivalent, just represent each decimal digit by its 4-bit binary equivalent. Example of BCD Decimal 5 2 9 BCD 0101 0010 1001
Gray Code
Gray Code is another important binary code. It is often used for encoding shaft position data from machines such as computer
controlled latches. Only one binary digit changes at a time as you count up in this code. Example Binary 0000 0001 0010 0011 0100 Gray 0000 0001 0011 0010 0110
Gray Code
Reading Assignment
Binary, Decimal, Octal, Hexa Decimal number systems with their conversion and addition, subtraction, multiplication, division and
digital devices.