2. Digital Electronics
• Digital electronics is the branch of electronics that deals with the
study of digital signals and the components that use or create
them.
• As mentioned above, a digital signal has two discrete levels or
values. Two different representations of digital signals are shown
in Fig. 1.1
3. • In each case there are two discrete levels. These levels can be
represented using the terms LOW and HIGH. In Fig. 1.a, lower of
the two levels has been designated as LOW level and the higher as
HIGH level.
• In contrast to this, in Fig. 1.1 b, higher of the two levels has been
designated as LOW level and the lower as HIGH level. Digital
systems using the representation of signal shown in Fig. 1.1 a are
said to employ positive logic system and those using the other
representation of the signal shown in Fig. 1.1 b are said to employ
negative logic system.
4. Boolean Algebra
• → Boolean algebra works with binary variables.
• → A Boolean algebra is an algebraic system consisting of the set {0,1}, the binary
operations called OR, AND, or NOT denoted by the symbols "+", ".", and "prime".
• → Boolean algebra enables the logic designer to simplify the circuit used, achieving
economy of Construction and reliability of operation.
• → Boolean algebra suggests the economic and straightforward way of describing the
circuitry used in any computer system.
• → Boolean algebra is unique in the way that; it takes only two different values either
0 or 1. It does not have negative number. It does not have fraction number.
26. NUMBER SYSTEM
Introduction to Number Systems
Counting in Decimal and Binary
Place Value
Decimal to Binary Conversion
Binary to Decimal Conversion
Decimal to Binary Conversion
Electronic Translators
Hexadecimal Numbers
Octal Numbers
Bits, Bytes and Words
27. Information representation
Elementary storage units inside computer are electronic switches.
Each switch holds one of two states: on (1) or off (0).
We use a bit (binary digit), 0 or 1, to represent the state.
ON OFF
27
Digital Electronics by Parag P.
28. Information representation
Storage units can be grouped together to cater for larger
range of numbers. Example: 2 switches to represent 4
values.
0 (00)
1 (01)
2 (10)
3 (11)
28
Digital Electronics by Parag P.
29. Information representation
In general, N bits can represent 2N different values.
For M values, bits are needed.
M
2
log
1 bit represents up to 2 values (0 or 1)
2 bits rep. up to 4 values (00, 01, 10 or 11)
3 bits rep. up to 8 values (000, 001, 010. …, 110, 111)
4 bits rep. up to 16 values (0000, 0001, 0010, …, 1111)
32 values requires 5 bits
64 values requires 6 bits
1024 values requires 10 bits
40 values requires 6 bits
100 values requires 7 bits
29
Digital Electronics by Parag P.
30. Positional Notations
Decimal number system, symbols = { 0, 1, 2, 3, …, 9 }
Position is important
Example:(7594)10 = (7x103) + (5x102) + (9x101) + (4x100)
In general, (anan-1… a0)10 = (an x 10n) + (an-1 x 10n-1) + … + (a0 x
100)
(2.75)10 = (2 x 100) + (7 x 10-1) + (5 x 10-2)
In general, (anan-1… a0 . f1f2 … fm)10 = (an x 10n) + (an-1x10n-1) + …
+ (a0 x 100) + (f1 x 10-1) + (f2 x 10-2) + … + (fm x 10-m)
30
Digital Electronics by Parag P.
31. Other Number Systems
Binary (base 2): weights in powers-of-2. Binary digits (bits): 0,1.
Octal (base 8): weights in powers-of-8. Octal digits:
0,1,2,3,4,5,6,7
Hexadecimal (base 16): weights in powers-of-16. Hexadecimal
digits: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
31
Digital Electronics by Parag P.
33. Decimal-to-Binary Conversion
Method 1: Sum-of-Weights Method
Method 2:
Repeated Division-by-2 Method (for whole numbers)
Repeated Multiplication-by-2 Method (for fractions)
33
Digital Electronics by Parag P.
34. Sum-of-Weights Method
Determine the set of binary weights whose sum is equal to the decimal
number.
(9)10 = 8 + 1 = 23 + 20 = (1001)2
(18)10 = 16 + 2 = 24 + 21 = (10010)2
(58)10 = 32 + 16 + 8 + 2 = 25 + 24 + 23 + 21
= (111010)2
(0.625)10 = 0.5 + 0.125 = 2-1 + 2-3
= (0.101)2
34
Digital Electronics by Parag P.
35. Repeated Multiplication-by-2 Method
To convert decimal fractions to binary,
repeated multiplication by 2 is used, until
the fractional product is 0 (or until the
desired number of decimal places). The
carried digits, or carries, produce the
answer, with the first carry as the MSB,
and the last as the LSB.
(0.3125)10 = (.0101)2
Carry
0.31252=0.625 0 MSB
0.6252=1.25 1
0.252=0.50 0
0.52=1.00 1 LSB
35
Digital Electronics by Parag P.
36. Conversion between Decimal and other Bases
Decimal to base-R
whole numbers: repeated division-by-R
fractions: repeated multiplication-by-R
36
Digital Electronics by Parag P.
37. Binary-Octal/Hexadecimal Conversion
Binary Octal: Partition in groups of 3
(10 111 011 001 . 101 110)2 = (2731.56)8
Octal Binary: reverse
(2731.56)8 = (10 111 011 001 . 101 110)2
Binary Hexadecimal: Partition in groups of 4
(101 1101 1001 . 1011 1000)2 = (5D9.B8)16
Hexadecimal Binary: reverse
(5D9.B8)16 = (101 1101 1001 . 1011 1000)2
37
Digital Electronics by Parag P.
38. Counting in
Decimal and Binary
• Number System -
Code using symbols that refer to
a number of items.
• Decimal Number System -
Uses ten symbols (base 10 system)
• Binary System -
Uses two symbols (base 2 system)
Digital Electronics by Parag P. 38
39. Place Value
• Numeric value of symbols in different positions.
• Example - Place value in binary system:
Binary
8s 4s 2s 1s
Number
Place Value
Yes Yes No No
1 0 0
1
RESULT: Binary 1100 = decimal 8 + 4 + 0 + 0 = decimal 12
Digital Electronics by Parag P. 39
40. Binary to Decimal Conversion
Convert Binary Number 110011 to a Decimal
Number:
1 1 0 0 1 1
Decimal
Binary
Digital Electronics by Parag P. 40
41. Decimal to Binary Conversion
Divide by 2 Process
Decimal # 13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
1 1
0
1
Divide-by-2 Process
Stops When
Quotient Reaches 0
Digital Electronics by Parag P. 42
42. Practice
Convert the following decimal numbers into
binary:
Decimal 11 =
Decimal 24 =
Decimal 17 =
Digital Electronics by Parag P. 43
43. Electronic Translators
Devices that convert from decimal to binary numbers
and from binary to decimal numbers.
Encoders -
translates from decimal to binary
Decoders -
translates from binary to decimal
Digital Electronics by Parag P. 44
44. Electronic Encoder –
Decimal to Binary
0
Decimal
to
Binary
Encoder
Binary output
Decimal input
0 0 0 0
5
0 1 0 1
7
0 1 1 1
3
0 0 1 1
• Encoders are available in IC form.
• This encoder translates from decimal input to binary
(BCD) output.
Digital Electronics by Parag P. 45
45. Binary-to-
7-Segment
Decoder/
Driver
Electronic Decoding –
Binary to Decimal
Binary input
0 0 0 0
Decimal output
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
• Electronic decoders are available in IC form.
• This decoder translates from binary to decimal.
• Decimals are shown on an 7-segment LED display.
• This decoder also drives the 7-segment display.
Digital Electronics by Parag P. 46
46. Uses 16 symbols - Base 16 System
0-9, A, B, C, D, E, F
Decimal
1
9
10
15
16
Binary
0001
1001
1010
1111
10000
Hexadecimal
1
9
A
F
10
Hexadecimal Number System
Digital Electronics by Parag P. 48
47. • Hexadecimal to Binary Conversion
Hexadecimal C 3
Binary 1100 0011
Binary 1110 1010
Hexadecimal E A
• Binary to Hexadecimal Conversion
Hexadecimal and Binary Conversions
Digital Electronics by Parag P. 49
48. Hexadecimal to Decimal Conversion
Convert hexadecimal number 2DB to a decimal
number
512 + 208 + 11 = 731
2 D B
Hexadecimal
Decimal
Place Value
256s 16s 1s
(256 x 2) (16 x 13) (1 x 11)
Digital Electronics by Parag P. 50
49. Practice
Convert Hexadecimal number A6 to Binary
Convert Hexadecimal number 16 to Decimal
Convert Decimal 63 to Hexadecimal
63 =
16 =
A6 =
Digital Electronics by Parag P. 51
50. Octal Numbers
Uses 8 symbols - Base 8 System
0, 1, 2, 3, 4, 5, 6, 7
Decimal
1
6
7
8
9
Octal
1
6
7
10
11
Binary
001
110
111
001 000
001 001
Digital Electronics by Parag P. 52
51. Practice
1. The octal number 7 equals ______ in binary.
2. The octal number 11 equals ______ in binary.
3. The decimal number 23 equals ______ in binary.
4. The decimal number 23 equals ______ in octal.
6. The octal number 37 equals ______ in decimal.
5. The octal number 37 equals ______ in binary.
Digital Electronics by Parag P. 53
52. Practical Suggestion on
Number System Conversions
• Use a scientific calculator
• Most scientific calculators have DEC, BIN,
OCT, and HEX modes and can either
convert between codes or perform
arithmetic in different number systems.
• Most scientific calculators also have other
functions that are valuable in digital
electronics such as AND, OR, NOT,
XOR, and XNOR logic functions.
Digital Electronics by Parag P. 54
53. Groupings of Binary Digits
•Bit 1-bit (0 or 1)
•Nibble 4-bits (such as 1101)
•Byte 8-bits (such as 1100 0111)
•Word 16-bits (common definition)
•Double-word 32-bits
•Quad-word 64-bits
Digital Electronics by Parag P. 55
54. Practice
1. A 4-bit grouping of binary digits is called a _____ (byte, nibble).
2. An byte refers to an a(n) _____ (8, 64)-bit group of binary digits.
3. A single binary digit (such as a 0 or 1) is called a _____ (bit, nibble).
4. A common definition for a word in computer jargon is a _____
(1, 16)-bit group of binary digits.
Digital Electronics by Parag P. 56