Module 3 21BEC114 124
Module 3 21BEC114 124
Module 3
Analog or Continuous Signal: The signal may acquire any value in a range of the independent
variable (time). Example: Analog Signal
Discrete or Digital Signal: The signal can have any value but it would remain constant over periods
of time called sampling period. Digital signals or numbers are processed by digital system using the
concept of binary numbers and Boolean algebra.
Number Systems: There are four number systems that are used in the digital systems.
1. Decimal Number System: It is the most commonly used numbering system in day-to-day life to
count, measure and label. Combination of ten digits from 0 to 9 are used to represent any number.
In this system the next position to the left from the decimal point represents units, tens, hundreds,
thousands etc. and the next position to the right after the decimal point represents ’s,
Example: 123.34 = 1 x 102 + 2 x 101 + 3 x 100 + 3 x 10-1 + 4 x 10-2 =100 + 20 + 3 + 0.3 + 0.04 =
123.43
2. Binary Number System: In binary numbering systems only two digits 0 and 1 are used to represent
any number. It will go like 0, 1, 10, 11, 100, 101, 110, 111, 1000 and so on. It is the numbering
system used in computers. In this system the next position to the left from the binary point represents
units, 2’s, 4’s, 8’s etc. and the next position to the right after the binary point
represents ’s, ( ’s, ’s etc.
Digits are: 0, 1 and Base value: 2
Example: 1010.101 = 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 + 1 x 2-1 + 0 x 2-2 + 1 x 2-3
= 8 + 0 + 2 + 0 + 0.5 + 0 + 0.125 = 10.625
3. Octal Number System: In octal numbering system combination of eight digits from 0 to 7 are used
to represent a number. It will go from 0…7, a two digit sequence is from 10..77 and a three digit
sequence is from 100…777 and so on. It is used to shorten the binary numbers.
Digits are: 0, 1, 2, 3, 4, 5, 6, 7 and Base value: 8
Example: 376 = 3 x 82 + 7 x 81 + 6 x 80 = 192 + 56 + 6 = 254
Conversions:
Decimal to Binary:
Integer Part: To convert the decimal integer to binary, divide the number by 2 and the successive
quotients by 2. The successive remainders (which can be only 0 or 1) written in reverse order form the
equivalent binary number.
Fractional Part: To convert decimal fractions to binary, multiply the number by 2 repeatedly until the
fraction product is 0 (or until the desired number of binary places). The whole digits of the multiplication
results produce the answer, with first as MSB and the last as LSB.
Assignment Problems:
1. Convert the following decimal number to binary up to four binary places.
(a) (47.8125)10 = ( )2
(b) (100.974)10 = ( )2
(c) (29.3749)10 = ( )2
(d) (105.202)10 = ( )2
(e) (1024.625)10 = ( )2
(f) (555)10 = ( )2
(g) (0.825)10 = ( )2
To convert the binary number to its equivalent decimal, multiply the binary digits by its
corresponding weights, and then add them.
Weights from the left of binary point are: , , , , etc
Weights from the right of binary point are: , , , , etc
Assignment:
1. Convert the following binary number to equivalent decimal number.
(a) (1101)2 = ( )10
(b) (10101)2 = ( )10
(c) (11001.011)2 = ( )10
(d) (11001.110)2 = ( )10
To convert the hexadecimal number to its equivalent decimal, multiply the hexadecimal digits by
its corresponding weights, and then add them.
Weights from the left of hexadecimal point are: , , , , etc
Weights from the right of hexadecimal point are: , , , , etc
Assignment:
2. Convert the following hexadecimal number to equivalent decimal number.
(a) (AF)16 = ( )10
(b) (B6A)16 = ( )10
(c) (ABC.CD)16 = ( )10
(d) (9FC1)16 = ( )10
Integer Part: To convert a decimal integer to hexadecimal, divide the number by 16 and the successive
quotients by 16. The successive remainders (which can be only 0 to 9 or A to F) written in reverse order
form the equivalent octal number.
Fractional Part: To convert decimal fractions to octal, multiply the number by 8 repeatedly until the
fraction product is 0 (or until the desired number of octal places). The whole digits of the multiplication
results produce the answer, with first as MSD and the last as LSD.
Assignment Problems:
3. Convert the following decimal number to hexadecimal.
(a) (57345)10 = ( )16
(b) (342.56)10 = ( )16
Binary Addition:
The rules of binary addition are:
0+0=0
0+1=1
1+0=1
1 + 1 = 0 (with carry 1)
Example 1: Perform addition of (11001100)2 and (11011010)2
1 1 1 ⟵ Carry
1 1 0 0 1 1 0 0
1 1 0 1 1 0 1 0
1 1 0 1 0 0 1 1 0
5. Perform the following operations using 1’s and 2’s complement technique.
i) (56)10 – (79)10 ii) (23)10 – (18)10.
0111000(56) 0111000
–1001111(79) ⟹ 2’s Complement: 0110000 +0110001
+1 1101001
0110001
No carry hence result is negative in 2’s complement form: 1101001 = 0010110 + 1 = 0010111 = –
23
7. i) Subtract (1000.01)2 from (1011.10)2 using 1’s and 2’s complement method.
ii) Add (7AB.67)16 with (15C.71)16.
Solution:
i) (1011.10)2 – (1000.01)2
Using 1’s Complement:
1011.10 (11.50) 1011.10
–1000.01 (08.25) ⟹ 1’s Complement: +0111.10
0011.01 (03.25) 1)0011.00
+1
0011.01 = 3.25d
a. (CAD.F1)16 + (BE1.54)16
Solution:
a. (CAD.F1)16 + (BE1.54)16
Solution:
i. (FC02A)16 – (D052)16
Boolean Algebra
A=A
1. Law of Identity
2. Commutative Law
3. Associative Law
4. Idempotent Law
6. Complementary Law
7. Law of Insertion
8. Law of Union
9. Distributive Law
State De Morgan’s theorem for 4 – variables and prove them by the method of perfect induction.
Solution:
1. Simplify, .
Solution:
OR:
2. Simplify
Solution:
Solution:
(a)
(b)
5. Show that:
Solution:
Logic Gates:
Logic gates are an electronic circuit which accepts binary input and produces a binary output namely
0 and 1. They are basic building blocks of digital circuits. They are used to create digital circuits
and even complex integrated circuits.
Combination of logic gates form circuits designed with specific tasks
Examples: Adders: to add binary numbers,
Flip-Flops: set or reset bits of memory,
Complex integrated circuits are complete circuits ready to perform several functions.
Examples: Microprocessors and Microcontrollers
There three categories of logic gates:
i. Basic Gates: NOT, OR & AND
ii. Derived Gates: EX-OR & EX-NOR
iii. Universal Gates: NAND & NOR
NOT Gate:
It is an electronic circuit having only one input and only one output. The output signal is always
opposite to the input signal and it is a physical realization of Boolean-Complement operation. It is
also called as inverter.
Function Table:
A L
Open (Low) ON (High)
Close (High) OFF (low)
When Input = 0 ;Switch is Opened
When Input = 1 ;Switch is Closed
OR Gate:
It is an electronic circuit having two or more inputs and only one output. The output is zero, when
all the inputs are zero, otherwise output is one. It is a physical realization of Boolean-Addition
operation.
3-Input Symbol:
Expression: Y = A + B + C
Function Table:
A B L
Open Open OFF
Open Close ON
Close Open ON
Close Close ON
When Input = 0 ;Switch is Opened
When Input = 1 ;Switch is Closed
Fig: Realization of OR Gate Using Switches
When A = 0 and B = 1:
Diode D1 does not conduct, since it is reverse biased. D2 conducts, since voltage B is high (5V)
hence current flows through RL, then voltage develops across RL that is approximately equal to
voltage B. Therefore Z = 1 (5V).
When A = 1 and B = 0:
Diode D2 does not conduct, since it is reverse biased. D1 conducts, since voltage A is high (5V)
hence current flows through RL, then voltage develops across RL that is approximately equal to
voltage A. Therefore Z = 1 (5V).
When A = 1 and B = 1:
Both the diodes D1 & D2 conducts, since they are forward biased, hence current flows through R L
and voltage approximately equal voltage A or B is developed across RL. Therefore Z = 1 (5V).
AND Gate:
It is an electronic circuit having two or more inputs and only one output. The output is one, when
all the inputs are one, otherwise output is zero. It is a physical realization of Boolean-
Multiplication operation.
Function Table:
A B L
Open Open OFF
Open Close OFF
Close Open OFF
When Input = 0 ;Switch is Opened Close Close ON
When Input = 1 ;Switch is Closed
Fig: Realization of AND Gate Using Switches
3-Input Symbol:
Expression: Y = A . B . C
It is an electronic circuit having two or more inputs and only one output. The output is zero, when
even number of inputs are one, and output is one, when odd number of inputs are one.
Application: It is used to implement magnitude comparator, gray code converter, adder/subtractor
circuits, parity generator, modulo-2 adder etc.
2-Input Symbol:
Expression:
Logic Circuit:
3-Input Symbol:
Expression:
Expression:
It is an electronic circuit having two or more inputs and only one output. The output is
complement of EX-OR gate output.
2-Input Symbol:
Expression:
Logic Circuit:
3-Input Symbol:
Expression:
Universal Gates:
NAND Gate:
It is an electronic circuit having two or more inputs and only one output. The output is complement
of AND gate output. It is also called as universal gate, because it can be used to realize all other
gates.
2-Input Symbol:
3-Input Symbol:
NOR Gate:
It is an electronic circuit having two or more inputs and only one output. The output is complement
of OR gate output. It is also called as universal gate, because it can be used to realize all other gates.
2-Input Symbol:
3-Input Symbol:
NOT Gate:
AND Gate:
OR Gate:
NOR Gate:
EX-OR Gate:
EX-NOR Gate:
NOT Gate:
AND Gate:
OR Gate:
NAND Gate:
EX-NOR Gate:
OR
EX-OR Gate:
OR
4. Simplify the following Boolean expressions and realize them using basic gates and universal
gates.
(a)
(b)
(c)
(d)
(e)
(f)
Solution:
(a)
Realization:
Basic Gate: NAND Gate: NOR Gate:
(b)
Realization:
Using Basic Gate: Using NAND Gate:
(c)
Realization:
Using Basic Gate: Using NAND Gate:
NOR Gate:
(d)
Realization:
Basic Gate: NAND Gate: NOR Gate:
(e)
Realization:
Basic Gate: NAND Gate:
NOR Gate:
(f)
Realization:
Using Basic Gate: Using NAND Gate:
6. Simplify and realize the following expressions using only NAND and NOR.
.
Dec.2015/Jan.2016, 15ELN15/25, 10 Marks
Solution:
(i)
NAND Realization:
NOR Realization:
(ii)
NAND Realization:
NOR Realization:
7. Simplify the given Boolean equation Y = (A + ) (CD + E) and realize using NAND gates only.
June/July 2017, 15ELN15/25,
04 Marks
Solution:
9. Simplify and realize the Boolean expression using two inputs NAND gates only (A + + C) ( +
B + C). Dec.2017/Jan.2018, 15ELN15/25, 05 Marks
Solution:
10. Write logic circuit using basic gates for the simplified expression: .
Dec.2015/Jan.2016, 10ELN15/25, 04
Marks
Solution:
; Apply De Morgan’s Law
; Apply De Morgan’s Law to individual terms
ii) ter
;Apply De Morgan’s law to 1st term and multiply 2nd & 3rd
ms
12. Simplify the following expressions and implement using only NAND Gates:
June/July.2014, 10ELN15/25,
08 Marks
a.
b.
c.
Solution:
a.
c.
Implementation Using NAND Gates:
Half Adder:
The combinational circuit that performs addition of two bits is called Half Adder. The half adder
operation needs two binary inputs: Augend & Addend and provides two binary outputs: Sum &
Carry.
Expressions:
Carry (Cout) = AB
Circuit Diagram:
& Carry = AB =
Sum =
Carry = AB =
Full Adder:
The combinational circuit that performs addition of three bits is called Full Adder. The full adder
has three binary inputs: Augend, Addend & Carry from previous operation and provides two
binary outputs: Sum and Carry.
Block Diagram:
Expressions:
and
Expressions:
Problems:
1. Design a combinational circuit that has 3 inputs and one output. The output is at logic 1 or logic
high only when even number of inputs are at logic 1.
Expression:
2. Design a logic circuit using basic gates with three inputs A, B & C and one output Y that goes
low only when A is high and B and C are different.
Expression:
Multiplexers
The objective of a multiplexer is to select one signal from a group of 2n inputs,to be an output on
a single output line. For example 8 –to-1 multiplexer (mux) is as shown in fig.Lines Do……D7 are the
data input lines and F is the output line. Lines A ,B and C are called the select lines. They are interpreted
as a three bit binary number,which is used to choose one of the D lines to be output on the line F.
Implementation
A mux can be designed with a regular pattern of AND and OR gates, as shown in fig.
Application
In all types of digital system applications, multiplexers find its immense usage. Since these allows
multiple inputs to be connected independently to a single output, these are found in variety of applications
including data routing, logic function generators, control sequencers, parallel-to-serial converters, etc.
Decoders
The objective of the decoder is to decode an n-bit binary number producing a signal on one of 2n
output lines. Figure shows an 3-to-8 decoder.
Implementation
A Decoder is often implemented with an additional input called an ‘enable’ line. When the line is
enabled, the circuit is a decoder. when it is disabled, all the outputs are 0.The same circuit can be used as
a de-multiplexer, which directs a single data input line to one of 2n output lines, depending on the values
of n select lines. Fig shows 3 to 8 decoder implementation.
Applications: Decoder memory address for reads and writes to random access memory.