Sunteți pe pagina 1din 43

Digital Electronics

Introduction:
As the name specifies continuous time signal has some value for every value of time.
The time period can be from -∞ to +∞. Continuous signal is also known as “Analog
Signal”.

In Discrete time signal value is specified at certain specific interval of time. Time
interval need not be equidistant, but for our simplification we take equidistant sample. If
a signal takes on value from a finite set of possible values, it is said to be discrete valued
signal. Discrete time signal with set of discrete value is called a “Digital Signal”.

Such Analog Signal and Discrete Signal are shown in figure 1 and 2 respectively.

Digital signals or Numbers, in general are processed by means of digital systems


using the concept of binary numbers and Boolean algebra. The numbers are coded in the
form of binary (ON/OFF) electrical pulses and processed by means of Logic gates and
memory cells. The logic gates and memory cells exploit the controlled switch behavior of
electronic devices. Binary signals are used extensively in communication, control and
instrumentation systems as well in computers. Binary signals have great advantage of
being far less susceptible to noise compared to analog signals.

Switching and Logic Levels:

Consider the simple switching circuit of figure 3 with switch ‘S’.

1
The switch can be in two states- OFF/ON,
When ‘S’ is in OFF state the output voltage is Vo= 5 Volts.(High)
When ‘S’ is in ON state the output voltage is Vo= 0 Volts (Low)

In digital circuits, variables which can acquire only two values are indicated as ‘0’ and
‘1’ invoking a branch of algebra known as “Boolean Algebra” and these are known as
Boolean or Binary variables.

 If switch condition at the Input, OFF as ‘0’ and ON as’1’


 At the Output Low as ‘0’ and High as’1’
 Then at the input applied ‘0’ results in output ‘1’ and input ‘1’ results in output
‘0’.Such circuits are called Switching Circuits. These kind of circuits are known as
‘Logic gates”, this particular circuit is known as ‘Inverter” or NOT gate.

It is symbolically represented in figure 4(a) with the table of input-output relationship


called “Truth table” as in Table1 and Input –Output waveform relationship as figure
4(b).’A’ is known as Boolean variable.

Buffer:

When a large current Io has to be fed to a load then a Buffer is connected between the
output terminal of the gate and load. Such Buffer symbol and its truth table are shown in
Figure 5 and Table2 respectively.

2
Digital waveform:

The digital waveform of logic levels shown in Figure 6, are ideal where 5V= High=1
and 0V=Low=0. Also the change over from H(1) to L(0) and vice versa is in zero time.

Actual waveform (Voltage level)

In high state output, the digital circuit acts as a source which feeds the load.

Therefore,

Vo(H) <5 Volts (say)


It can have minimum value
VoH (minimum)=3.5 Volts (say)
This is to be recognized that H(1)
Vo=+3.5 V to + 5 V

In low state, the digital circuit acts as a sink, receives current from the source.
So,

VoL>0
Its maximum value to be recognized as Zero is
Vo= 0 V to VoL(max)= 0.2 V (say).
The Forbidden region is then
(VoH (min) –VoL (max))=3.5-0.2=3.3V0lts

Where the signal cannot be recognized as H(1) or L(0).These conclusions are illustrated
in Figure6.

3
Number system
There are several number systems which we normally use, such as Decimal, Binary,
Octal, Hexadecimal etc.
These systems are classified according to the values of the base of the number
system. The number system having the value of the base as ‘10’ is called “Decimal
number system”, where as that with base as ‘2’ is called “Binary number system”.
Likewise the number systems having base ‘8’ and base ‘16’ are called “Octal” and
“Hexadecimal” number systems respectively. With decimal number system we have 10
different digits which are 0,1,2,3,4,5,6,7,8,and 9. Binary number system has only 2
different digits ie, ‘0’ and ‘1’. We generally use the binary system when we deal with
digital word.

For example: If we want to express (25)10 in binary we may write (11001)2 .

The right most digit in a number system is called “Least Significant Bit” (LSB) or
“Least Significant Digit”(LSD). The left most digit in a number system is called “Most
Significant Bit” (MSB) or “Most Significant Digit” (MSD).

Normally when we deal with different number systems we specify the base as
subscript to make it clear which number system is being used.

Similarly in Octal number system there are ‘8’ digits 0, 1, 2, 3,4,5,6 and 7. Hence any
octal number cannot have any digit greater than 7. Hexadecimal number system has 16
digits 0 to 9 and rest of the six digits are specified by letter symbols as A, B, C, D, E, and
F. Here A, B, C, D, E and F represent decimal numbers 10, 11, 12, 13, 14 and 15
respectively.

Number System Representation:

A number can be represented by the equation

Where
‘N’ Is the value of the entire number.
dn' is the value of the nth digit from the decimal point
‘r’ is the Radix or Base.
Total number of digits equal to (n+1): (0, 1,2,3,4 ...n)

Decimal Number system:

Decimal number system is a Base ‘10’ number system. Positional notation or


Positional weighting system is used. Each digit is multiplied by an appropriate power of
‘10’depending on its position in the number.
Example: N=6841
In given N total number of digits (n+1)=4
Therefore n=3 , For decimal system Radix or Base value is ‘10’.

4
Consider

6841= (6*103)+8*102)+4*101)+(1*100)
6841=6000+800+40+1
6841= (6841)10

Binary Number system:

Binary number system is a Base ‘2’ system. Where only the digits ‘o’ and ‘1’ are
used. Using this numbering system, all numbers are represented by series 0’s and 1’s.

BIT (bit): is an abbreviated form of Binary digit.

1 Nibble --- 4 bits


1 Byte ---- 8 bits
1 Word ---- 16 bits

The Binary system has Base ‘2’. Thus, each position has a value that is a factor of ‘2’.

24 23 22 21 20 Exponential value of position


16 8 4 2 1 Integer value of position

With fractional numbers ie, positions after the decimal point (or Binary point) where the
exponential values commence from -1 onwards as indicated.

Binary 2-1 2-2 2-3 2-4 Exponential value of position


point 1/2 1/4 1/8 1/16 Integer value of position

Decimal to binary conversion:

1. Consider the given decimal number before decimal point and divide successively
by 2 until the number is not divisible by2 and at the same time write reminder for
every division at the RHS side.
2. Write all the remainder from bottom to top gives the binary equivalent number of
that given decimal number before decimal point.
3. For the conversion of fractional part of decimal number multiply it by 2 and write
the carry or if there is any digit goes beyond fractional point take out the carry and
multiply it until it reaches Zero or until sufficient accuracy is obtained.
4. Write all the carries generated from number of multiplication procedure from top
to bottom to get the binary equivalent of decimal fractional part.

5
Binary to Decimal conversion:

1. Count the number of binary digits before fractional, binary or radix point and put
the weight of each digit as 0, 1, 2 ... from right hand side to left hand side. Let N
is the total number of bits or digits; the last digit has a weight of (N-!)

6
2. Count the number of binary digit after the radix or binary point and put the weight
of each digit as-1,-2,-3....., from left hand side to right hand side. Let M is the
number of bits, last bit or digit has weight equal to 2-M.
3. Write the binary bit stream in generalized equation.
4. Finally add all the products, which give the number equivalent to the decimal
number system.
Example;
Convert (10110.110)2 in to decimal system
OR (10110.110)2 = (?)10

1 0 1 1 0 . 1 1 0
1*24 0*23 1*22 1*21 0*20 . 1*2-1 1*2-2 0*2-3
16 +0 +4 +2 +0 . 0.5 + 0.25 +0
22 . 75

Hence the result is


(10110.110)2 = (22.75)10

Binary to Hexadecimal conversion:

1. Group the given binary digit or bits from RHS to LHS before binary or radix
point 4 bits at a time. If the last group is not equal to 4 bits prefix the required
number of 0’s and the value will not change.
2. Write the corresponding Hexadecimal number for each group gives the
Hexadecimal representation of binary digits.
3. Group the given digit or bit from LHS to RHS after of radix point 4 bits at a time.
If the last group is not equal to 4 bits postfix the required number of 0’s and the
value will not change.
4. Write the corresponding Hexadecimal equivalent number for each group gives the
Hexadecimal representation of binary digits.

7
Hexadecimal to Binary conversion:

Since 24 is equal to 16, the number given in Hexadecimal system is to be written in


binary system by considering each Hexadecimal bit from LHS to RHS and is to be
written in its equivalent binary number. If the number is separated by Hexadecimal or
radix point in given Hexadecimal number then the Hexadecimal or radix point is placed
exactly at that place in binary number.
For the Hexadecimal number representation in binary number use only four binary bits.

Example:
(1ABC. 2F) 16 = (?) 2

Hexadecimal 1 A B C . 2 F
Decimal 1 10 11 12 . 2 15
Binary 0001 1010 1011 1100 . 0010 1111
1101010111100 . 00101111

Hence result is
(1ABC.2F) 16 = (1101010111100. 00101111) 2

Decimal to Hexadecimal conversion:

1. Consider the given decimal number before decimal point and divide successively
by ‘16’ until the number is not divisible by’16’ and at the same time write
reminder for every division at the RHS ( in this we may get reminder from 0to 9
and A to F).
2. Write all the remainder from bottom to top gives the binary equivalent number of
that given decimal number before decimal point
3. For the conversion of fractional part of decimal number multiply it by ‘16’ and
write the carry or if there is any digit goes beyond fractional point take out the
carry and multiply
4. it until it reaches Zero or until sufficient accuracy is obtained.
5. Write all the carries generated from number of multiplication procedure from top
to bottom to get the Hexadecimal equivalent of decimal fractional part.

8
Hexadecimal to Decimal conversion:

1. Count the number of Hexadecimal digits before radix point and put the weight of
each digit as 0, 1, 2 ... from right hand side to left hand side. Let N is the total
number of bits or digits; the last digit has a weight of (N-!)
2. Count the number of Hexadecimal digit after the radix or binary point and put the
weight of each digit as-1,-2,-3....., from left hand side to right hand side. Let M is
the number of bits, last bit or digit has weight equal to 2-M.
3. Use the generalized equation for converting it to decimal equivalent
4. Finally add all the products terms, which gives the number equivalent to the
decimal number system.

Example;
Convert (ABC.CD) 16 in to decimal system OR (ABC.CD) 16 = (?)10

A B C . C D

A*162 B*161 C*160 . C*16-1 D*16-2


10*162 11*161 12*160 . 12*16-1 13*16-2
2560 176 12 . 0.75 0.050
2748 . 80

Hence result is
(ABC.CD) 16 = (2748.80)10

9
Binary to Octal conversion:

1. Group the given binary digit or bits from RHS to LHS before binary or radix
point ‘3’ bits at a time. If the last group is not equal to ‘3’ bits prefix the required
number of 0’s and the value will not change.
2. Write the corresponding octal number for each group gives the octal
representation of binary digits.
3. Group the given digit or bit from LHS to RHS after of radix point ‘3’ bits at a
time. If the last group is not equal to ‘3’ bits postfix the required number of 0’s
and the value will not change.
4. Write the corresponding octal equivalent number for each group gives the octal
representation of binary digits.

Different Number System Chart:

Decimal Binary Octal Hexadecimal


0 0 0 0 0 0 0
1 0 0 0 1 1 1
2 0 0 1 0 2 2
3 0 0 1 1` 3 3
4 0 1 0 0 4 4
5 0 1 0 1 5 5
6 0 1 1 0 6 6
7 0 1 1 1 7 7
8 1 0 0 0 10 8
9 1 0 0 1 11 9
10 1 0 1 0 12 A
11 1 0 1 1 13 B
12 1 1 0 0 14 C
13 1 1 0 1 15 D
14 1 1 1 0 16 E
15 1 1 1 1 17 F

10
Hints for Conversion:

 Others to Decimal -------- Multiply


 Decimal to Others ------- Divide
 Binary to Hexadecimal -- Group of ‘4’
 Binary to Octal ------- Group of ‘3’
 Hexadecimal to Octal ---- Hexadecimal-- Binary--Octal
 If we come across with a large binary number, that has to be converted to
decimal, we first convert number into Hexadecimal, then convert Hexadecimal to
Decimal.

11
Complement of Binary Numbers
1’s complement of a binary number is just an inversion of individual bits.

2’s complement of a given number can be found by adding ‘1’ to the least significant
bit of the 1’s complement of the given number.

2’s complement method is used to represent Negative numbers. Complements of binary


numbers are used in digital computers to make logical manipulation and subtraction
operation easy.

Binary subtraction using 1’s complement method:

Consider two binary numbers ‘M’ and ‘N’


If Y = M –N (then M=>Minuend and N=> Subtrahend)

Procedure:
1’s complement of subtrahend can be taken Add the 1’s complement of subtrahend to
Minuend
Case-1:
 If carry is generated (End Around Carry) as a result of this addition processes (then
this addition process may not able to give the correct required result).
 To get the actual result carry generated must be added to the LSB of the remaining
result part.

12
Case-2:
 If carry not generated as a result of this addition processes (then this addition
process may not able to give the correct required result).
 To get the actual result we should take the complement vale of the result obtained
with Negative sign.

13
Binary subtraction using 2’s complement method:

Consider two binary numbers ‘M’ and ‘N’


If Y = M –N (then M=>Minuend and N=> Subtrahend)

Procedure:

2’s complement of subtrahend can be taken


Add the 2’s complement of subtrahend to Minuend

Case-1:
 If carry is generated as a result of this addition processes.
 Discard the carry and read the value if the remaining part of the result as the true
value of the result with positive sign.

Case-2:
 If carry not generated as a result of this addition processes.
 Then this addition process may not able to give the correct required result.
 To get the true value of the result we should take the 2’s complement of the result
obtained with Negative sign.

14
Few examples:

15
16
Boolean Algebra
Boolean algebra is a system of mathematical logic developed by George Boole. The
Laws of Boolean algebra are used to simplify and evaluate logic expression. Operations
like addition (+), Subtraction (-), Multiplication (×) and Division (÷) are used to evaluate
arithmetic expression. Logical expressions have their own operations: i.e. AND (.), OR
(=) and NOT ( ' or ¯¯ ).

Three basic binary operations are

17
Identities of Boolean Algebra:

De Morgan’s Theorem or Law:

“De Morgan’s theorem states that the inversion bar of an expression may be broken at
any point and the operation at that point is replaced by its opposite (ie., AND is replaced
by OR or vice versa)”.

Truth table to prove De Morgan’s theorem

18
Proof for few Boolean Algebra theorem:

19
Logic Gates

A logic gate is an Electronic circuit which makes Logical decisions The most
commonly used logic gates are NOT, OR, AND,NOR and NAND gates In addition to
these EX-OR and EX-NOR gates are other types. Which can be constructed using Basic
gates NOT, OR and AND,

NOT Gate:

The NOT gate performs the basic logic function called “Inversion” or
“Complementation”. The Purpose of this gate is to convert one logic level into the
opposite logic level. It has one input and one output.

OR gate:

The OR gate performs logical addition known as OR operation. The OR gate has 2 or
more inputs and one output. The output of OR gate is high (ie. logic ‘1’) only when any
one of the input is high. The output is low (ie. Logic ‘0’) when all the inputs are low.

20
AND gate:

The AND gate performs logical multiplication known as AND operation. The AND
gate has 2 or more inputs and one output. The output of AND gate is high (ie. logic ‘1’)
only when all the inputs are high. The output is low (ie. Logic‘0’), when any one of the
input is low.

NOR gate:

NOR gate is a combination of OR-NOT. The NOR gate has 2 or more inputs and one
output. The output of NOR gate is high (ie. logic ‘1’) only when all the inputs are low.
The output is low (ie. Logic‘0’), when any one of the input is high.

21
NAND gate:

NAND gate is a combination of AND-NOT. The NAND gate has 2 or more inputs
and one output. The output of NAND gate is high (ie. logic ‘1’) when any one of the
input is low. The output is low (ie. Logic‘0’), when all the input are high.

EX-OR gate:

An EX-OR gate is a gate with 2 or more input and one output. The output of EX-OR
gate is low when all the input are identical, otherwise it is high.

22
EX-NOR gate:

An EX-NOR gate is a gate with 2 or more input and one output. The output of EX-
NOR gate is high when all the input are identical, otherwise it is low.

Realization of AND gate using Switches:

Realization of AND gate using Diodes:

23
Realization of OR gate using Switches :

Realization of OR gate using Diodes:

Realization of NOT gate using Transistor:

24
UNIVERSAL GATE:

The NAND and NOR gates are termed as Universal gates, because any logic function can
be built by suitably inter connecting NAND or NOR gates

Realization of NOT function using NAND gates

Realization of AND function using NAND gates:

Realization of OR function using NAND gates:

Realization of EX-OR function using NAND gates:

25
Realization of EX-NOR function using NAND gates:

Realization of NOR function using NAND gates:

Realization of NOT function using NOR gates:

Realization of AND function using NOR gates:

Realization of OR function using NOR gates:

26
Realization of EX-OR function using NOR gates:

Realization of EX-NOR function using NOR gates:

Realization of NAND neither function using NOR gates:

27
Implementing a function from a Boolean expression:

28
Realize the Boolean expression Y=AD+BD

1) Using Basic gates

2) Using NAND gates

3) Using NOR gates

Realize the Boolean expression Y= (A+B) D

1) Using Basic gates

2) Using NAND gates

29
3) Using NOR gates

Importance of simplification of Boolean expression before realization using gates:

30
Realize the Boolean expression:

Realize the Boolean expression Using logic gates

Realize the Boolean expression Using logic gates

31
Realize the Boolean expression Using logic gates

Realization of Boolean expression only with NAND gates by using graphical


representation method:
Procedure:

• Write the logic diagram for the given Boolean expression using Basic gates (i.e..
Using AND, OR and NOT gates).
• Insert the bubble at the output side of AND gate and at the input side of OR gate.
• Replace each bubble by NOT gate, if there are double inverters eliminate the
double inverters.
• Finally replace all the gates by NAND gates.

32
Realization of Boolean expression only with NOR gates by using graphical
representation method:

Procedure:

• Write the logic diagram for the given Boolean expression using Basic gates (i.e..
Using AND, OR and NOT gates).
• Insert the bubble at the output side of OR gate and at the input side of AND gate.
• Replace each bubble by NOT gate, if there are double inverters eliminate the
double inverters.
• Finally replace all the gates by NOR gates

33
Combinational circuits
Logic gates are the fundamental building blocks of the combination logic circuit.
When logic gates are connected together to produce a specified output for certain
specified combinations of input variable, with no storage involved, the resulting network
is called “Combinational logic”.
In combinational circuit, the outputs at any instant of time depend upon the input
present at that instant of time.
Examples: Adders, Sub tractors, Decoders Multipliers, comparators etc,

Half Adder:

A logic circuit for the addition of two-one-bit binary numbers is referred to as an


“Half Adder”. The Half Adder accepts two binary digits at its input and produces two
binary digits at its output i.e., a “SUM” bit and a “CARRY” bit.

a) Realization of Half Adder using Basic gates.

34
b) Realization of Half Adder using EX-OR and Basic gate.

c) Realization of Half Adder using NAND gates

d) Realization of Half Adder using NOR gates.

35
Disadvantage of Half Adder:
Half Adder has only provision for input and if cascade number of half adders then there is
no provision to add the carry bit generated from previous half adder. This can be avoided
in full adder circuit.

Full Adder:

Full Adder is a combination logic circuit which performs the addition of three binary bits.
It consists of three inputs and two outputs

Truth Table

36
37
a) Realization of Full Adder using Basic gates.

b) i) Realization of Full Adder using EX-OR and Basic gates.

38
b) ii) Realization of Full Adder using EX-OR and Basic gates.

b) Iii) Realization of Full Adder using EX-OR and Basic gates (using 2 Half adder).

c) i) Realization of Full Adder using NAND gates.

39
c) ii) Realization of Full Adder using NAND gates.

d) Realization of Full Adder using NOR gates.

40
Parallel Binary Adder
An n-bit adder is a circuit which adds two n-bit numbers say A&B. In addition an n-
bit adder will have another single bit input which is added to the two numbers called the
carry-in (Cin). The output of the n-bit adder is an n-bit SUM (S) and a CARRY- OUT
(Cout) bit.
Block diagrams of Half Adder and Full Adder:

If the binary numbers being added are A3, A2, A1, A0 and B3, B2, B1, B0
Then

The carry out bit of one stage of full adder is used as carry-in i.e. Input to the next
stage. In general, an n-bit binary parallel adder can be built out of ‘n’ full adder blocks
(or with ‘n-1’ full adder block and one half adder block).

i)Parallel Binary Adder circuit using Half Adder and Full Adder Blocks.

41
ii) Parallel Binary Adder circuit using only Full Adder Blocks.

Example:

42
Example:

43

S-ar putea să vă placă și