Professional Documents
Culture Documents
AND LOGIC
DESIGN
UNIT-I
Number System
Number Systems
Decimal
Binary
Octal
Hexa Decimal
Number Base Conversions
Conclusion
Text Books
+5 +5
1 0 1
V V
Time Time
–5 –5
Digital: Analog:
only assumes discrete values values vary over a broad range
continuously
Advantages of Digital System over
Analog System
• Reproducibility of the results and accuracy
• Flexibility and Functionality
• Speed: Digital logic Element can produce
an output in less than 10 nano seconds
• Economy: Due to integration of millions of
digital logic elements on a single miniature
chip forming low cost integrated circuit
• Less memory storage requirement
• Easy to process the digital signals
Applications of Digital Systems
• Cellular and Mobile Communications
• Business Transactions
• Traffic Control
• Space Guidance
• Medical Treatment
• Weather Monitoring
• Internet of Things
• Digital Television
• Digital Cameras
• Digital Computers
Number Systems
• Positive radix, positional number systems
• A number with radix (base) r (or b) is
represented by a string of digits (n
in integer and m in fraction):
A n - 1 A n - 2 … A 1A 0 . A - 1 A - 2 … A - m
Integer Part Fraction Part
where “.” is the radix point.
The string of digits represents the
power series:
j=-1
i=n-1
(Number) =
A i r
i
Aj r
j
r
i=0 j=-m
+ve exponents -ve exponents
Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F
Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 100 1010 1011 1100 110 1110 1111
1 1
Octal 0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17
Number - Base
Conversion
• The possibilities:
Decimal Octal
Binary Hexadecimal
Decimal to Decimal (just for
fun)
Decimal Octal
Binary Hexadecimal
Decimal Octal
Binary Hexadecimal
Binary to Decimal
• Technique
–Multiply each bit by 2n, where n is
the “weight” of the bit
–The weight is the position of the
bit, starting from 0 on the right
–Add the results
Examples
EX1:
1010112 => 1x25+0x24+1x23+0x22+1x21+1x20 =43
EX2:
( 1 0 1 1 0 . 0 1 0 1 )2 = 2¹ + 2² + (2^4) +( 2^-2) + (2^-4)
Decimal Octal
Binary Hexadecimal
Octal to Decimal
• Technique
–Multiply each bit by 8n, where n is the
“weight” of the bit
–The weight is the position of the bit,
starting from 0 on the right
–Add the results
Example:
7248 => 7x82+2x81+4x80 = 46810
Hexadecimal to Decimal
Decimal Octal
Binary Hexadecimal
Hexadecimal to Decimal
• Technique
–Multiply each bit by 16n, where n is
the “weight” of the bit
–The weight is the position of the
bit, starting from 0 on the right
–Add the results
Example
Decimal Octal
Binary Hexadecimal
Decimal to Binary
• Technique
–Divide by two, keep track of the
remainder
–First remainder is bit 0 (LSB, least-
significant bit)
–Second remainder is bit 1
Octal to Binary
Decimal Octal
Binary Hexadecimal
Octal to Binary
• Technique
–Convert each octal digit to a 3-bit
equivalent binary representation
Example
7058 = ?2
7 0 5
7058 = 1110001012
Hexadecimal to Binary
Decimal Octal
Binary Hexadecimal
Hexadecimal to Binary
• Technique
–Convert each hexadecimal digit to
a 4-bit equivalent binary
representation
Example
10AF16 = ?2
1 0 A F
10AF16 = 00010000101011112
Decimal to Octal
Decimal Octal
Binary Hexadecimal
Decimal to Octal
• Technique
–Divide by 8
–Keep track of the remainder
Binary to Octal
Decimal Octal
Binary Hexadecimal
Binary to Octal
• Technique
–Group bits in threes, starting on
right
–Convert to octal digits
Example
10110101112 = ?8
1 3 2 7
10110101112 = 13278
Hexadecimal to Octal
Decimal Octal
Binary Hexadecimal
Hexadecimal to Octal
• Technique
–Use binary as an intermediary
Decimal to Hexadecimal
Decimal Octal
Binary Hexadecimal
Decimal to Hexadecimal
• Technique
–Divide by 16
–Keep track of the remainder
Binary to Hexadecimal
Decimal Octal
Binary Hexadecimal
Binary to Hexadecimal
• Technique
–Group bits in fours, starting on
right
–Convert to hexadecimal digits
Example
10101110112 = ?16
10 1011 1011
2 B B
10101110112 =
2BB16
Octal to Hexadecimal
Decimal Octal
Binary Hexadecimal
Octal to Hexadecimal
• Technique
–Use binary as an intermediary
Positive Powers of 2
• Powers of 2
Exponent Value Exponent Value
0 1 11 2,048 2K
1 2 12 4,096 4K
2 4 13 8,192 8K
3 8 14 16,384 16 K
4 16 15 32,768 = 215 = 25 x 210 = 32 K
5 32 16 65,536 64 K
6 64 17 131,072 128 K
7 128 18 262,144 256 K
8 256 19 524,288 512 K
9 512 20 1,048,576 1M
10 1024 1 K 21 2,097,152 2M
Binary Numbers:
Special Powers of 2
210
(1024) is Kilo, denoted "K"
220 (1,048,576) is Mega, denoted "M"
230 (1,073, 741,824) is Giga, denoted
"G"
240 (1,099,511,628) is Tera, denoted “T"
1.1-) List the octal and the hexadecimal numbers from 16 to 32.
Octal :
16 = 8¹ x 2 + 8º x 0 => (16)10 = (20)8
32 = 8¹ x 4 + 8º x 0 => (32)10 =
(40)8
20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 40
Hexadecimal :
16 = 16¹ x 1 + 16º x 0 => (16)10 =
(10)16
32 = 16¹ x 2 + 16º x 0 => (32)10 =
(20)8
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B , 1C, 1D, 1E, 1F, 20
Binary:
(111111111111)2
Decimal:
(111111111111)2 = 1x 2º+ 1 x 2¹ + 1 x 2² +…..+ 1 x 2¹¹
(111111111111)2 = 4,095
Hexadecimal:
(FFF)16 F F
(4310)5 = 0 x 5º + 1 x 5¹ + 3 x 5² + 4 x 5³ = 0 + 5 + 75 + 500
(4310)5 = (580)10
(16.5)16 = 6 + 16 + (5/16)
(16.5)16 = 22.3125
(a) ( 1 . 1101 0 )2 = ( 1 . D )16 = 1 x 16º + D x (16^-1)
1 D 0 0 -1
(68BE)
16
Binary form:
(0110 1000 1011
6
1110) 8 B E
2=(0110100010111110) 2
Octal form:
(0 110 100 010 111
0 62 4
110) 2 7 6
=(064276)8
Convert the decimal number 345 to binary
(a) 34.4375
34 0.437
5
34/2=17 r=0 0.4375*2=0.875 r=0
17/2=8 r=1 0.875*2=1.75 r=1
8/ 2=4 r=0 0.75*2=1.5 r=1
4/2=2 r=0 0.5*2=1.0 r=1
2/2=1 0*2=0 r=0
r=0
0.4375=(0.01110)
2
34=(100010)2
34.4375=(100010.01110)
2
Conclusion
• Overview of the Subject
• Learned about Numbers Systems:
–Decimal
–Binary
–Octal
–Hexa Decimal
–Number – Base Conversions