0% found this document useful (0 votes)
20 views

Module 4 - 548 - 24ESC14C - 30-10-2024

Uploaded by

24ug1bycs702
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Module 4 - 548 - 24ESC14C - 30-10-2024

Uploaded by

24ug1bycs702
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

MODULE 4

DIGITAL ELECTRONICS

Prepared by
Dr. Anna Merine George
Asst. Professor, Dept of ECE, BMSIT&M

1
INTRODUCTION

•A signal is a function of one or more variables that conveys information on the


nature of a physical phenomenon.

•Eg: Speech signal (1-D), Image (2-D)

2
ANALOG & DIGITAL SIGNAL

• Analog signal – signal defined • Digital Signal – quantized discrete time


continuously at all instants of time signal

x[n] •Discrete time signal


•Signal is defined at
discrete instants of time.
3
n
WHY DIGITAL OVER ANALOG SIGNALS?

• Digital signals are Easy to store and manipulate (reliable)


• Improving accuracy of digital signals is easier, say by increasing the number of
levels. In analog, to improve accuracy, the sensitivity of the device have to be
improved which increases the cost exponentially

4
BLOCK DIAGRAM OF DIGITAL SYSTEM

• Digital electronics is the field of electronics involving the study of digital signals
and the engineering of devices that use or produce them.
• Usually made from logic gates, packaged in integrated circuits.
• Each logic gate is designed to perform a Boolean function

5
NUMBER SYSTEM

• It is form of expressing the numbers.


• The general representation of number systems are
• Decimal Number – Base 10 - 𝑁10
• Binary Numbers – Base 2 - 𝑁2
• Octal Numbers – Base 8 - 𝑁8
• Hexadecimal Numbers – Base 16 - 𝑁16
In general a number is expressed in base –r system has coefficients multiplied by power
of r
𝑎𝑛 𝑟 𝑛 + 𝑎𝑛−1 𝑟 𝑛−1 + ⋯ … . +𝑎2 𝑟 2 + 𝑎1 𝑟1 + 𝑎0 + 𝑎−1 𝑟 −1 + 𝑎−2 𝑟 −2 … . .

6
WHY NUMBER SYSTEMS?

• Communication between systems


• Converting between binary and hexadecimal helps in debugging and understanding
low level programming languages like assembly.
• A color in computer graphics is represented in hexadecimal (eg: #FF5733 for RGB
values)
• Addressing and memory locations in computers are represented in hexadecimal
format.
• Play important role in cryptography and digital security

7
NUMBER SYSTEMS

8
NUMBER SYSTEMS

9
NUMBER CONVERSIONS

• Any number system to decimal


• (11010.11)2 − 1 ∗ 24 + 1 ∗ 23 + 0 ∗ 22 + 1 ∗ 21 + 0 + 1 ∗ 2−1 + 1 ∗ 2−2 =26.7510
• (4021.2)5
• (𝐵65𝐹)16
• (630.4)8

• Decimal to binary Conversion


• Octal/Hexadecimal to binary Conversion
• Binary to Octal/Hexadecimal Conversion

10
BINARY TO DECIMAL CONVERSIONS

Convert Binary Number 110011


to a Decimal Number:

Binary 1 1 0 0 1 1

Decimal 32 + 16 + 0 + 0 + 2 + 1 = 51
11
DECIMAL TO BINARY CONVERSION

Divide by 2 Process
Decimal # 13 ÷ 2 = 6 remainder 1

6 ÷ 2 = 3 remainder 0

3 ÷ 2 = 1 remainder 1

1 ÷ 2 = 0 remainder 1
12

1 1 0 1
NUMBER CONVERSIONS

• Encoder translates from decimal input to binary (BCD) output.


• Decoder translates from binary to decimal.
• Decimals are shown on an 7-segment LED display.
• This decoder also drives the 7-segment display
Binary input Decimal output
0 10 01 01

Binary-to-
7-Segment
Decoder/
Driver
13
HEXADECIMAL AND BINARY CONVERSIONS

•Hexadecimal to Binary Conversion


Hexadecimal C 3

Binary 1100 0011

•Binary to Hexadecimal Conversion


Binary 1110 1010

Hexadecimal E A 14
DECIMAL TO HEXADECIMAL
CONVERSION

Divide by 16 Process

Decimal # 47 ÷ 16 = 2 remainder 15

2 ÷ 16 = 0 remainder 2

2 F 15
HEXADECIMAL TO DECIMAL
CONVERSION

Convert hexadecimal number 2DB


to a decimal number

Place Value 256s 16s 1s

Hexadecimal 2 D B
(256 x 2) (16 x 13) (1 x 11)

Decimal 512 + 208 + 11 = 731 16


EXAMPLE

Convert Hexadecimal number A6 to Binary

A6 = 1010 0110 (Binary)

Convert Hexadecimal number 16 to Decimal


16 = 22 (Decimal)

Convert Decimal 63 to Hexadecimal


17
63 = 3F (Hexadecimal)
BINARY ADDITION

Add the binary numbers 1010 and 11 Add the Binary numbers 11010 and 1100

(carry) (carry)(carry)

1 1 1

1 0 1 0 1 1 0 1 0
+ 1 1 + 1 1 0 0

1 1 0 1 1 0 0 1 1 0

18
COMPLEMENTS

• Used in digital computers for simplifying the subtraction operation and for
logical manipulations.
• If the largest negative quantity to be represented is True origin
Offset Origin
known then it is possible to place the offset origin
sufficiently far to the left of the true origin so that all
*7 -3
negative quantities are measured rightward of the offset
10 units
origin.
Here in this example, 7 is the complement of 3. Graphical interpretation of
complements

19
TYPES OF COMPLEMENTS

• r’s complement:
• For Binary number: 2’s complement and for decimal numbers 10’s complement
• A positive number N in base r with an integer part of n digits, the r’s
complement of N is defined as 𝑟 𝑛 − 𝑁 for 𝑁 ≠ 0 and 0 for N=0.
• Find the r’s complement of following:
• 10’s complement of (52520)10 is 105 − 52520 = 47480
• 2’s complement of (101100)2 is (26 )10 - (101100)2 =010100
• 10’s complement of (0.3267)10 is 1 – 0.3267 = 0.6733.
No integer part , so 10n = 100 = 1
20
COMPLEMENTS

21
TYPES OF COMPLEMENT

• (r-1)’s complement
• A positive number N in base r with an integer part of n digits and a
fraction part of m digits, the (r-1)’s complement of N is defined as 𝑟 𝑛 −
𝑟 −𝑚 − 𝑁.
• 9’s complement of (0.3267)10 is 1 − 10−4 − 0.3267 =0.6732
• 1’s complement of (0.0110)2 is (1 − 2−4 )10 - (0.0110)2 =0.1001
• r’s complement can be obtained from the (r-1)’s complement after the
addition of 𝑟 −𝑚 to the least significant digit

22
SUBTRACTION WITH R’S COMPLEMENT

• Subtraction of two positive numbers (M-N), both of base r may be done as


follows:
• Add the minuend M to the r’s complement of the subtrahend N
• Inspect the result obtained in step1 for an end carry:
• If an end carry occurs, discard it
• If an end carry does not occur, take the r’s complement of the number obtained in
step 1 and place a negative sign in front.

23
EXAMPLE

• Using 10’s complement, subtract 72532 – 3250.


M = 72532
N = 3250 72532
10’s complement of N = 96750 + 96750
1 69282
End carry
Answer: 69282

24
EXAMPLE

• Subtract (3250 – 72532)10.


M = 3250
N = 72532 03250
10’s complement of N = 27468 + 27468
30718
No end carry
Answer: – 69282 = – (10’s complement of 30718)

25
ADDING/SUBTRACTING IN 2S
COMPLEMENT
2s complement notation makes it possible to add and subtract signed numbers

(Decimal) 2s Complement
(+1) 0001
(- 1) 1111
+ (- 3) + 1101
+ (- 2) + 1110 (- 2) 11 1 0 2s complement

(- 3) 1 11 0 1 2s complement
(+5) 0 1 0 1
Discard
+ (- 4) + 1 1 0 0
(+1) 1 0 0 0 1
26
Discard
EXAMPLE

• M=1010100, N=1000100, perform M-N and N-M using 2’s complement


method

27
SUBTRACTION WITH (R-1)’S
COMPLEMENT

• Subtraction of two positive numbers (M-N), both of base r may be done as


follows:
• Add the minuend M to the (r-1)’s complement of the subtrahend N
• Inspect the result obtained in step1 for an end carry:
• If an end carry occurs, add 1 to the least significant digit
• If an end carry does not occur, take the (r-1)’s complement of the number obtained in
step 1 and place a negative sign in front.

28
EXAMPLE

• Using 9’s complement, subtract 72532 – 3250.


M = 72532
N = 3250 72532
9’s complement of N = 96749 + 96749
1 69281
End carry
+1
69282
Answer: 69282
29
BOOLEAN ALGEBRA

• It is mathematical system with a set of elements, a set of operators and a


number of unproved axioms or postulates.
• Common postulates used to formulate algebraic structures are:
• Closure – A set is closed with respect to binary operator, if for every pair of elements
of S, the binary operator specifies a rule for obtaining a unique element of S
• Associative Law
• 𝑥 ∗ 𝑦 ∗ 𝑧 = 𝑥 ∗ (𝑦 ∗ 𝑧) 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥, 𝑦, 𝑧 ∈ 𝑆
• Commutative Law
• 𝑥∗𝑦 = 𝑦∗𝑥 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥, 𝑦 ∈ 𝑆

30
BOOLEAN ALGEBRA

• Identity element: A set S is said to have an identity element with respect to


binary operator * on S
• 𝑒∗𝑥 =𝑥∗𝑒 =𝑥 𝑓𝑜𝑟 𝑒𝑣𝑒𝑟𝑦 𝑥 ∈ 𝑆
• Element 0 is an identity element with respect operation + on the set of
integers I . Element 1 is an is an identity element with respect operation * on
the set of integers I.
• Inverse: A set having identity element e with respect to binary operator * is
said to have an inverse whenever, for every 𝑥 ∈ 𝑆 there exists an element 𝑦 ∈
𝑆 such that 𝑥 ∗ 𝑦 = 𝑒
• In the set of integers I with e=0, the inverse of an element a is (-a).

31
BOOLEAN ALGEBRA

• Distributive Law – If * and . are two binary operators on a set S, * is said to be


distributive over . whenever
• 𝑥 ∗ 𝑦. 𝑧 = 𝑥 ∗ 𝑦 𝑥 ∗ 𝑧
• Boolean algebra is a mathematical system for the manipulation of
variables that can have one of two values.
• In formal logic, these values are “true” and “false.”
• In digital systems, these values are “on” and “off,” 1 and 0, or “high” and
“low.”
• Boolean expressions are created by performing operations on Boolean
variables.
• Common Boolean operators include AND, OR, and NOT.

32
BOOLEAN ALGEBRA

• A Boolean operator can be completely described


using a truth table.
• The truth table for the Boolean operators AND
and OR are shown at the right.
• The AND operator is also known as a Boolean
product. The OR operator is the Boolean sum.
• The truth table for the Boolean NOT operator is
shown at the right.
• The NOT operation is most often designated by
an overbar. It is sometimes indicated by a prime
mark ( ‘ ) or an “elbow” ().

33
BOOLEAN ALGEBRA

• A Boolean function has:


• At least one Boolean variable,
• At least one Boolean operator, and
• At least one input from the set {0,1}.
• It produces an output that is also a member of the set {0,1}.

34
BOOLEAN PROPERTIES & THEOREMS

35
BOOLEAN PROPERTIES & THEOREMS

• Sometimes it is more economical to build a circuit using the complement of


a function (and complementing its result) than it is to implement the
function directly.
• DeMorgan’s law provides an easy way of finding the complement of a
Boolean function.
36
MINTERMS

◆ Consider variables A and B


◆ Assume that they are somehow combined with AND operator
◆ There are 4 possible combinations
' ' ' '
AB, A B, AB , A B
◆ Each of those terms is called a minterm (standard product)
◆ In general, if there are n variables, there are 2 n minterms

37
MINTERMS FOR 3 VARIABLES

38
MAXTERMS

◆ Consider variables A and B


◆ Assume that they are somehow combined with OR operator
◆ There are 4 possible combinations

A + B, A + B, '
A+ B , A + B
' ' '

◆ Each of those terms is called a maxterm (standard sums)


◆ In general, if there are n variables, there are 2 n maxterms

39
MAXTERMS FOR 3 VARIABLES

40
EXAMPLE

• Express F in the sum of minterms and product of


maxterms formats

41
SUM OF PRODUCTS (SOP)

All products are the product of single variable only

42
PRODUCT OF SUMS (POS)

All sums are the sums of single variables

43
LOGIC GATES

• Boolean functions are implemented in digital computer circuits called


gates.
• A gate is an electronic device that produces a result based on two or
more input values.
• In reality, gates consist of one to six transistors, but digital designers think of
them as a single unit.
• Integrated circuits contain collections of gates suited to a particular
purpose.

44
LOGIC GATES

45
LOGIC GATES

46
LOGIC GATES

• NAND and NOR are known as


universal gates because they are
inexpensive to manufacture and any
Boolean function can be constructed
using only NAND or only NOR gates.

47
DIGITAL CIRCUITS

The circuit below implements the Boolean function:

48
COMBINATIONAL CIRCUITS

• Combinational logic circuits produce a specified output (almost) at the


instant when input values are applied.
• One of the simplest is the half adder, which finds the sum of two bits.

49
FULL ADDER

Input Output
Logic Cin  (Sum)
Symbol: Full
A
B Adder Cout (carry
out)

Full Adder is the adder that adds three inputs and produces two outputs.

50
FULL ADDER –TRUTH TABLE & LOGIC
DIAGRAM

𝑠𝑢𝑚=𝐴⊕𝐵⊕𝐶𝑖𝑛
𝐶𝑜𝑢𝑡=𝐴𝐵+𝐵𝐶𝑖𝑛+𝐴𝐶𝑖𝑛

51
IMPLEMENTATION OF HALF ADDER
WITH NAND GATES

52
IMPLEMENTATION OF HALF ADDER
WITH NOR GATES

53
PROBLEMS

1. Draw a network to realize the following by using only one AND gate and one
OR gate

2. Draw a network to realize the following by using two OR gates and two
AND gates

3. Prove the following equations using truth table

54

You might also like