�Digital Electronics�
• Switches and Transistors
• Boolean Algebra and Logic
• Binary Arithmetic and Number Systems
• Combinational Logic and Circuits
• Sequential Logic and Circuits
• Memory Logic Design
1
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
�Computer Architecture V/S Computer Organization�
• Computer Architecture is the programmer’s perspective on functional behavior of a computer for example 32 bits will be used to represent an integer value.
• Computer organization is the internal structural relationships not visible to a program for example physical memory
2
Memory
CPU
I/O
I/O Processor
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Two Side View of Computer System
3
I/O system
Instr. Set Proc.
Compiler
Operating
System
Application
Digital Design
Circuit Design
Instruction Set
Architecture
Firmware
Datapath & Control
Layout
Software
Hardware
Software/Hardware
Boundary
High-Level Language Programs
Assembly Language
Programs
Microprogram
Register Transfer
Notation (RTN)
Logic Diagrams
Circuit Diagrams
Machine Language
Program
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Basic Units
4
input
output
An ideal switch
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Analog and Digital Systems
0 and 1 (digits of the binary number system= Bits conventionally 0=LOW or False and 1= HIGH or TRUE
5
High
Low
Digital circuit
inputs
outputs
:
:
Analog Signal
Digital Signal
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
�Advantages of Digital Systems Over Analog Systems
6
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Number Systems
Dr = d p-1 d p-2 ….. d1 d0.d-1 d-2 …. D-n
7
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Number Systems Used in Computers
8
Number System
Radix
Ordered Set Example
Decimal
r = 10
r = 2
r = 16
r = 8
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9} 5510
Binary
{0, 1, 2, 3, 4, 5, 6, 7} 3778
{0, 1} 111111112
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F} FF16
Octal
Hexadecimal
Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F
Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
�Binary numbers�
• Bit a binary digit representing a 0 or a 1.
(101)2 = (1×22)+(0×21)+(1×20)=410 + 110 = 510
(10111)2 = (1×24)+(0×23)+(1×22)+(1×21)+(1×20)=2310
(41)10 = 41/2 + remainder = 1🡪1LSB
= 20/2 + remainder = 0 🡪2SB
= 10/2 + remainder = 0 🡪3SB
= 5/2 + remainder = 1 🡪 4SB
= 4/2 + remainder = 0 🡪 5SB
= 2/2 = 1
🡪 1010012
9
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
�Largest numbers�
The largest number of d digits in base R is = Rd- 1
Examples:
3 digits of base 10: 103-1 = 999
2 digits of base 16: 162 -1 = 255
10
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Decimal-to-Binary Conversion
179 / 2 = 89 remainder 1 (LSB)
/ 2 = 44 remainder 1
/ 2 = 22 remainder 0
/ 2 = 11 remainder 0
/ 2 = 5 remainder 1
/ 2 = 2 remainder 1
/ 2 = 1 remainder 0
/ 2 = 0 remainder 1 (MSB)
17910 = 101100112
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
11
*
Solved Examples of Decimal-to-Binary
108/2 = 54
54 * 2 = 108, remainder 0
54 /2 = 27
27 * 2 = 54, remainder 0
27/2 = 13.5
13 * 2 = 26, remainder 1
13 /2 = 6.5
6 * 2 = 12, remainder 1
6/2 = 3
3 * 2 = 6, remainder 0
3/2 = 1
1 * 2 = 2, remainder 1
11011002
12
11/2 = 5.5
5 * 2 = 10, remainder 1
5/2 = 2.5
2 * 2 = 4, remainder 1
2/2 = 1
1 * 2 = 2, remainder 0
1 / 2 = 0
0 * 2 = 0, remainder 1
10112
7/2 = 3.5
3 * 2 = 6, remainder 1
3/2 = 1
1 * 2 = 2, remainder 1
1/2 = 0
0 * 2 = 0, remainder 1
1112
90/2 = 45
45 * 2 = 90, remainder 0
45/2 = 22.5
22 * 2 = 44, remainder 1
22 * 2 = 44, remainder 0
22/2 = 11
11 * 2 = 22, remainder 0
11/2 = 5.5
5 * 2 = 10, remainder 1
5/2 = 2.5
2 * 2 = 4, remainder 1
2/2 = 1
1 * 2 = 2, remainder 0
1 / 2 = 0
0 * 2 = 0, remainder 1
10110102
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Decimal-to-Hex examples
108/16 = 6.75
6 * 16 = 96, remainder 12
6 /16 = 0
0 * 16 = 0, remainder 6
6C16
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
13
20/16 = 1
1 * 16 = 16, remainder 4
1/16 = 0
0 * 16 = 0, remainder 1
1416
32/16 = 2
2 * 16 = 32, remainder 0
2 /16 = 0
0 * 16 = 0, remainder 2
2016
90/16 = 5.625
5 * 16 = 80, remainder 10
5 / 16 = 0
0 * 16 = 0, remainder 5
5A16
160/16 = 10
10 * 16 = 160, remainder 0
10/16 = 0
0 * 16 = 0, remainder 10
A016
*
Decimal-to-Octal example
108/8 = 13.5
13 * 8 = 104, remainder 4
13/8 = 1
1 * 8 = 8, remainder 5
1 / 8 = 0
0 * 8 = 0, remainder 1
1548
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
14
10/8 = 1
1 * 8 = 8, remainder 2
1/8 = 0
0 * 8 = 0, remainder 1
128
16/8 = 2
2 * 8 = 16, remainder 0
2/8 = 0
0 * 8 = 0, remainder 2
208
24/8 = 3
3 * 8 = 24, remainder 0
3/8 = 0
0 * 8 = 0, remainder 3
308
*
Decimal-to-Binary Conversion
Result Digit
.3125 × 2 = 0.625 0 (MSB)
.625 × 2 = 1.25 1
.25 × 2 = 0.50 0
.5 × 2 = 1.0 1 (LSB)
0.312510 = .01012
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
15
*
Binary Arithmetic Operations - Addition
1 0 1 1 1 1 0 0 0 Carry
X 190 1 0 1 1 1 1 1 0
Y + 141 + 1 0 0 0 1 1 0 1
X + Y 331 1 0 1 0 0 1 0 1 1
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
16
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 with a carry of 1
*
Binary Arithmetic- subtraction�
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
17
95 = 1011111
-16 = 0010000
79 = 1001111
0 – 0 = 0
1 – 0 = 1
1 – 1 = 0
0 – 1 = 1 with a borrow of 1
*
Binary Arithmetic Operations: Subtraction
0 0 1 1 1 1 1 0 0 Borrow
X 229 1 1 1 0 0 1 0 1
Y - 46 - 0 0 1 0 1 1 1 0
183 1 0 1 1 0 1 1 1
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
18
*
Binary Arithmetic - Multiplication�
19
1011
*101
1011
0000
1011
110111
0 * 0 = 0
0 * 1 = 0
1 * 0 = 0
1 * 1 = 1
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Negative Binary Number Representations
Use the first bit (most significant bit, MSB) position to
represent the sign where 0 is positive and 1 is negative.
Ex. 1 1 1 1 1 1 1 12 = - 12710
-2(n-1) + 1 to 2(n-1) - 1
20
Sign
Magnitude
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Parity bit�
21
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
�Gray codes�
• In binary codes, number of bit changes are not constant,
000🡪001🡪010🡪011🡪100🡪101🡪110🡪111🡪1000…
22
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Alphanumeric Binary Codes: ASCII
23
7 bit codes are used to represent all upper and lower case letters, numbers, punctuation and control characters
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Boolean Algebra
e.g. 0 OR 1 = 1 0 OR 0 = 0
1 AND 1 = 1 1 AND 0 = 0
NOT 0 = 1 NOT 1 = 0
24
What is an Algebra?
set of elements (e.g. 0,1,2,..) + set of operations (e.g. +, -, *,..) + postulates/axioms (e.g. +x=x,..)
For example : (e.g. algebra of integers)
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Digital (logic) Elements: Gates
25
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Boolean Algebra
26
Signals: High = 5V = 1; Low = 0V = 0
x
y
x.y
x
y
x+y
x
x'
AND
OR
NOT
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Logic Gates
27
EXCLUSIVE OR
a
b
a.b
a
b
a+b
a
a'
a
b
(a+b)'
a
b
(a.b)'
a
b
a ⊕ b
a
b
a.b
&
a
b
a+b
+
AND
a
a'
1
a
b
(a.b)'
&
a
b
(a+b)'
≥1
a
b
a ⊕ b
=1
OR
NOT
NAND
NOR
Symbol set 1
Symbol set 2
(ANSI/IEEE Standard 91-1984)
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Truth Tables
28
x
y
x . y
x + y
0
0
0
0
0
1
0
1
1
0
0
1
1
1
1
1
Digital circuit
inputs
outputs
x
y
inputs
outputs
x + y
x . y
Truth table
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Logic Gates: The AND Gate
29
A
B
A.B
Truth table
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Ground
Vcc
Top View of a TTL 74LS family 74LS08 Quad 2-input AND Gate IC Package
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Logic Gates: The OR Gate
30
A
B
A+B
Truth table
Top View of a TTL 74LS family 74LS08 Quad 2-input OR Gate IC Package
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Logic Gates: The NAND Gate
31
A
B
(A.B)'
A
B
(A.B)'
≡
Truth table
Top View of a TTL 74LS family 74LS00 Quad 2-input NAND Gate IC Package
x
x'
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Logic Gates: The NOR Gate
32
≡
A
B
(A+B)'
A
B
(A+B)'
Truth table
Top View of a TTL 74LS family 74LS02 Quad 2-input NOR Gate IC Package
x
x'
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Logic Gates: The XOR Gate
33
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Ground
Vcc
A
B
A ⊕ B
Truth table
Top View of a TTL 74LS family 74LS86 Quad 2-input XOR Gate IC Package
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Drawing Logic Circuits
F1 = xyz'
(note the use of a 3-input AND gate)
34
x
y
z
F1
z'
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Analyzing Logic Circuits
35
A'B'
A'B'+C
(A'B'+C)'
A'
B'
C
F4
F4 = (A'B'+C)'
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Integrated Circuits
36
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Computer Hardware Generations
(e.g IBM 7000 series, DEC PDP-1)
Assignment : Prepare Time line of Operating Systems.
37
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/
Assignment
Note :- Submit Video Links . And code links in Github.
38
*
Dr. Shaligram Prajapat https://sites.google.com/site/shaligramiipsdavvindore/