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
The word digital comes from the same source as the words digit and digitus (the Latin word for finger), as fingers
are often used for counting. Mathematician George Stibitz of Bell Telephone Laboratories used the word digital in
reference to the fast electric pulses emitted by a device designed to aim and fire anti-aircraft guns in 1942. [1] The term
is most commonly used in computing and electronics, especially where real-world information is converted to binary 5
numeric form as in digital audio and digital photography.
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
• In General a number with a decimal point is represented by a series of coefficients
• Exp: .
12
Solutions:
13
Number base conversion
• Convert Decimal to binary
• i)
• ii)
• Convert Decimal to octal
• i)
• Ii)
14
Solutions
15
Contd.
• Octal to Hexa-decimal numbers
16
Solution
• Steps: 1) Convert octal to binary. Every octal number will be represented by 3 bin
binary.
• 2 6 1 5 3 .7 4 0 6
• 011 110 001 101 011 111 100 000 110
• 2) Take 4 bit binary to convert it to hexadecimal. Taken 4 bit pair in right to left
direction for the integer and left to right for the fraction.
• 0010 1100 0110 1011.1111 0000 0110
• 2 C 6 B. F 0 6
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
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
20
(r-1)’s complement
• Given a number N in base r having n digits, the (r-1)’s complement of N, i.e , its
diminished radix complement, is defined as (-1)-N
• Calculate :
• 9’s complement of 546700, 012398
• 1’s complement of 1011000, 0101101
21
r’s complement
• The r’s complement of an n-digit number N in base r is defined as -N
• Calculate :
• 10’s complement of 546700
• 2’s complement of 0101101
22
Subtraction with complements
• The subtraction of two n-digit unsigned numbers M-N in base r can be done as
follows:
• 1) Add the minuend M to the r’s complement of the subtrahend N. Mathematically
M+().
• 2) If M≥N, the sum will generate an end carry, which can be discarded; what is left is
the result M-N.
• 3) If M<N, the sum doesn’t produce an end carry. To obtain the answer take r’s
complement of the sum and place a negative sign in front.
23
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
24
Solutions
25
26
27
28
Signed and Unsigned Number
• Unsigned numbers are by definition positive numbers and thus do not require an
arithmetic sign. An n-bit unsigned number represents all numbers in the range 0 to -
1. For example, the range of 8 bit unsigned binary numbers is from 0 to 255 in
decimal, 00 to FF in hexadecimal.
• Signed numbers, on the other hand, require an arithmetic sign. The most significant
bit of a binary number is used to represent the sign bit. If the sign bit is equal to zero,
the signed binary number is positive; otherwise, it is negative. The remaining bits
represent the actual 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
Signed 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
Signed-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
Signed-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
• 1+1=0 with carry 1 + 12 1100
35
Subtraction of Unsigned Numbers
• The subtraction operation is performed as an addition operation using the 2’s
complement method.
36
Addition Using the Signed–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 Signed 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 Signed 2’s-Complement
Method
• Using the same examples as above, the two’s-complement method is implemented.
39
Subtraction Using the Signed 2’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
B I N A RY C O D E S – Decimal No. in other
Codes
• Any discrete element of information that is distinct among a group of quantities can
be represented with a binary code (i.e., a pattern of 0’s and 1’s).
• The codes must be in binary because, in today’s technology, only circuits that
represent and manipulate patterns of 0’s and 1’s can be manufactured economically
for use in computers.
• An n‐bit binary code is a group of n bits that assumes up to 2n distinct combinations
of 1’s and 0’s, with each combination representing one element of the set that is
being coded.
• A set of four elements can be coded with two bits, with each element assigned one
of the following bit combinations: 00, 01, 10, 11.
• A set of eight elements requires a three‐bit code and a set of 16 elements requires a
four‐bit code. The bit combination of an n‐bit code is determined from the count in 41
binary from 0 to 2n - 1.
BCD code:
BCD Addition:
42
43
Other Decimal codes:
44
45
46
47