Module 1 Part 1
Module 1 Part 1
1
Ref Book
• Digital Design by M. Morris Mano | Michael D. Ciletti
2
Continuous Time and Discrete Time
Signals
A signal that is specified for every value of time t is a continuous time signal
Exp: Gross national product (GNP), monthly sales of a corporation, stock market daily
average etc
3
4
5
Signal Types
6
Fig.2 (a) Analog Continuous Time, (b) Digital, Continuous Time (c) Analog, Discrete
Time (d) Digital, Discrete Time
A/D Converter
You can see this video:
https://www.youtube.com/watch?v=zucfv7lU0Ws&pbjreload=10
8
Number Systems
• Decimal Number System (radix or base 10)
• Binary Number System (radix or base 2)
• Octal Number System (radix or base 8)
• Hexa Decimal Number System (radix or base 16)
9
Different Number System and their use
10
Positional Number System
•
11
Exps:
•
12
Solutions:
•
13
Number base conversion
•
14
Solutions
15
Contd.
•
16
Solution
•
17
Addition of two numbers in Decimal, Binary, Octal and
Hexadecimal number systems:
18
Subtraction of two numbers in Decimal, Binary, Octal and
Hexadecimal number systems:
19
20
21
Complements of numbers
• Complements are used in digital computers to simplify the subtraction operation
• There are two types of complement-
• i) Radix Complement
• Ii) Diminished radix complement
22
(r-1)’s complement
•
23
r’s complement
•
24
Subtraction with complements
•
25
Exp:
• Compute (M-N)
• 1) M=72532, N=3250
• 2) M=3250, N=72532 by 10’s complement
• Compute (X-Y)
• 3) X=1010100, Y=1000011
• 4) X=1000011, Y=1010100 by 2’s complement
26
Solutions
27
28
Signed and Unsigned Number
•
29
Contd.
• There are three ways to represent negative numbers.
• 1) Sign magnitude representation
• 2) 1’s complement representation
• 3) 2’s complement representation
30
Sign Magnitude Representation
• A number is represented in its binary form. The most significant bit (MSB) represents
the sign. 1 in MSB denotes a negative number; 0 in MSB denotes a positive number.
The remaining n-1 bits are preserved and represent the magnitude of the number
• Exp:
• (+3) = 0011 (-3) = 1011
• (+7) = 0111 (-7) = 1111
• (+0) = 0000 (-0) = 1000
31
1’s Complement Representation
• In the 1’s complement form, The MSB represents the sign. The remaining bits are
inverted for negative numbers only. Positive numbers are represented in the same
way as in the sign-magnitude method.
• Exp:
• (+3) = 0011 (-3) = 1100
• (+7) = 0111 (-7) = 1000
• (+0) = 0000 (-0) = 1111
32
2’s Complement Representation
In the 2’s complement method, the negative numbers are inverted and augmented by
one. The MSB is the sign bit. The positive numbers are similar to those of the sign-
magnitude method.
• Exp:
• (+3) = 0011 (-3) = 1101
• (+7) = 0111 (-7) = 1001
• (+0) = 0000 (-0) = 0000
33
Negative Number Representation
34
Binary Arithmetic
• Addition of Unsigned numbers:
• Only positive numbers are used
(+5) 0101
• 0+0=0 with carry 0 +(+7) 0111
• 0+1=1 with carry 0 -----------------------
• 1+0=1 with carry 0
+ 12 1100
• 1+1=0 with carry 1
35
Subtraction of Unsigned Numbers
• The subtraction operation is performed as an addition operation using the 2’s
complement method.
36
Addition Using the Sign–Magnitude
Method
• The addition of signed numbers using the sign–magnitude method is simple if the
operands in the addition are of the same sign, wherein the result takes on the sign of
the operands. But in case the operands have different signs, the process becomes
complicated.
• when used in computers it requires logic circuits to compare and subtract the
numbers. Since it is possible to carry out the process without this circuitry, this
method is not used in computer design.
37
Addition Using the 1’s-Complement
Method
• This method uses the simplicity of one’s complement in representing the negative of
a number. The process of addition using the one’s-complement method may be
simple or complicated, depending on the numbers being used.
38
Addition Using the Two’s-Complement Method
• Using the same examples as above, the two’s-complement method is implemented.
39
Subtraction Using the Two’s-Complement
Method
• The process of subtraction is carried out similarly to the addition process. The 2’s
complement of the subtrahend is computed and added to the minuend.
40
BCD code:
BCD Addition:
41
42
Other Decimal codes:
43
44
45