You are on page 1of 12

Electronics

PHY 234
Fall 2021

Dr. Muhammad Habib


Department of Physics
COMSATS University Islamabad
Applications of logic gates

 Miscellaneous information
 Binary numbers conversions
 Applications of logic gates
 Half adder
 Full adder
 Half subtractor
 Full subtractor

COMSATS University Islamabad 2


Miscellaneous information

• Indexing &
IC configuration

COMSATS University Islamabad 3


Binary Numbers
 In binary numbers, the two digits used are 0 and 1.
 Binary numbers are also call base 2 numbers, and can be understood by abstracting the rules we
all know for the numbers we commonly use (base 10 numbers).
 When we write down a base 10 number, each digit can have 10 possible values, 0 to 9, and each
digit corresponds to 10 raised to a power.
 For example, when we write 102410, this is equal to
=1000 + 0 + 20 + 4
 Similarly, for binary numbers, each digit can have only 2 possible values, 0 or 1, and each digit of the number
corresponds to 2 raised to a power.

(Binary to decimal conversion method)

COMSATS University Islamabad 4


Convert decimal number 41 into binary.

COMSATS University Islamabad 5


COMSATS University Islamabad 6
Applications of logic gates
Half Adder
 Logic gates can be used to perform binary addition.
 Suppose A and B are two binary numbers consisting of one bit,
so each can only have the value 0 or 1.
 Logic circuit shown in the figure is the Half Adder and table shows the
four possible combinations for A and B and their sum.
 C and S represents carry and sum.

AND XOR

COMSATS University Islamabad 7


Applications of logic gates

Full Adder
 Binary addition can involve more
than two digits.
 Simple half adders can not be
employed to get more digit addition operation.
 To deal with three digits binary addition operation,
two half adders with one OR gate are required.

COMSATS University Islamabad 8


Applications of logic gates
Half Subtractor
 A half-subtractor is a logic gate combinational
circuit that can be used to subtract one binary digit
from another to produce a DIFFERENCE output
and a BORROW output.
 The BORROW output here specifies
whether a ‘1’ has been borrowed to perform the subtraction.

COMSATS University Islamabad 9


Applications of logic gates
Full Subtractor
 A full subtractor performs subtraction operation on two bits,
a minuend and a subtrahend, and also takes into consideration
whether a ‘1’ has already been borrowed by the previous adjacent
lower minuend bit or not.
 So, three bits are handled at the input of a full subtractor,
namely the two bits to be subtracted and a borrow bit designated as Bin.
 There are two outputs, namely the DIFFERENCE output D
and the BORROW output Bo. The BORROW output bit tells whether
the minuend bit needs to borrow a ‘1’ from the next possible
higher minuend bit.

COMSATS University Islamabad 10


Applications of logic gates
Full Subtractor
 A full subtractor performs subtraction operation on two bits,
a minuend and a subtrahend, and also takes into consideration
whether a ‘1’ has already been borrowed by the previous adjacent
lower minuend bit or not.
 So, three bits are handled at the input of a full subtractor,
namely the two bits to be subtracted and a borrow bit designated as B in.
 There are two outputs, namely the DIFFERENCE output D
and the BORROW output Bo. The BORROW output bit tells whether
the minuend bit needs to borrow a ‘1’ from the next possible
higher minuend bit.

COMSATS University Islamabad 11


Thanks for your attention please.

COMSATS University Islamabad 12

You might also like