Digital Electronics: 1. Number System & Codes 2. Binary Airthmetic 3. Logic Gates
Digital Electronics: 1. Number System & Codes 2. Binary Airthmetic 3. Logic Gates
Digital Electronics: 1. Number System & Codes 2. Binary Airthmetic 3. Logic Gates
CONTENTS
2. BINARY AIRTHMETIC
3. LOGIC GATES
A number system with base ‘r’, contents ‘r’ different digits and they are from 0 to r
– 1.
Decimal to other codes conversions: To convert decimal number into other system
with base ‘r’, divide integer part by r and multiply fractional part with r.
Octal to Binary and Binary to Octal: Same procedure as discussed above but here
group of 3 bits is made.
Codes:
Binary coded decimal (BCD):
In BCD code each decimal digit is represented with 4 bit binary format.
10
Eg : (943) 1001 0100 0011
949 BCD
It is also known as 8421 code
Invalid BCD codes
Total Number possible 2 1 6
4
MSB 1 1 0 1 1 Gray
In any representation
+ve numbers are represented similar to +ve number in sign magnitude.
1’ Complement Addition: When the numbers have different signs, keep one
number as it is and take 1’s complement of the negative number and add them.
If carry occurs:
(a) add carry to LSB
(b) sign of the result is sign of the complemented number.
If carry does not occur:
(a) take 1’s complement of the result
(b) sign of the result is sign of the complemented number.
2’ Complement Addition: When the numbers have different signs, keep the
positive number as it is and take 2’s complement of the negative number and add
them.
If carry occurs:
(a) carry is discarded
If carry does not occur:
(a) take 2’s complement of the result
(b) sign of the result is sign of the complemented number
BCD Addition: Add the BCD numbers as regular true binary numbers.
If the sum is 9(1001) or less, it is a valid BCD answer.
If sum is greater than 9 or if there is carryout of MSB, it is an invalid BCD number.
If it is invalid, add 6 (0110) to the result to make it valid. Any carry out of the MSB
is added to the next more-significant BCD number. Repeat steps for each group of
BCD bits
76 0111 0110
94 1001 0100
Invalid BCD number
170 1 0000 1010
1 0000 1010
Overflow condition : If x and y are the MSB’s of two numbers and z is resultant
MSB after adding two numbers then overflow conditions is
x yzxyz1
BOOLEAN ALGEBRA
Basic Operations:
AND OR NOT
A. A=A A+A=A
A.0=0 A+0=A A=A
A.1=A A+1=1
A.A=0 A+A=1
Boolean algebra Laws:
Commutative Law: A + B = B + A and A.B = B.A
Associative Law: A + (B + C) = (A + B) + C = A + B + C
A.(B.C) = (A.B).C = A.B.C
De Morgan’s Law:
A1 .A2 .A3 ......An =A1 +A2 +....+An
A1 +A2 +A3 .....+An =A1.A2 .....An
Involution Theorem: A = A
Absorption Theorem: A + AB = A
Dual Expression: It will convert positive logic into negative and negative logic into
positive logic.
Procedure:
1. Change each OR sign by AND and vice-versa.
2. Convert all 1s to 0s and all 0s to 1s.
3. Keep variables as it is.
If one time dual is as same as function then it is known as self dual expression.
by: ENGINEERS INSTITUTE OF INDIA. ALL RIGHTS RESERVED www.engineersinstitute.com
Boolean Function Representation:
Canonical Form: All terms contain each literal.
F(A, B, C) = ABC ABC ABC
Standard form: All the terms do not have each literal.
F(A, B, C) A BC ABC
Sum of Product (SOP) :
In SOP form each product term is known as minterm.
SOP forms are used to write logical expression so that the output becomes logic
‘1’.
Notation for SOP expression is f (A, B, C) = m(3, 5, 6, 7)
The most typical logical operations are implemented by AND and OR gates.
The logical expression for the AND operation is “if A is true AND B is true
then X is true”, and for the OR operation is “if A is true OR B is true then X
is true”. The inverted logic AND and OR gates are commonly known as
NAND (Not AND) and NOR (Not OR) gates. A XOR (Exclusive-OR) gate
implements the logical expression “if A is different than B then X is true”,
hence sometimes this gate is called “inequality comparator”.
The buffer and the inverter are not gates but their use is closely associated
with them. A buffer doesn’t change the logic state of its input. It is only
occasionally used for increasing the fan-out, i.e. the capability of the output
of one gate to drive a number of other gates. The inverter is much more
important and it is used for inverting a logic state, i.e. for performing the
logical operation of negation (NOT). The logical expressions for a buffer and
an inverter are “X is A” and “X is NOT A”, respectively. AND, OR, NAND
and NOR gates can have more than 2 inputs. In this case their truth tables are
extended to all inputs combinations and their corresponding expressions as
well. For example, the logical expression for a 4-input AND is “if A is true
AND B is true AND C is true AND D is true then X is true”. The
corresponding expression for a 3-input NOR gate is “if A is true OR B is true
OR C is true then X is false”
Decoders
Decoders are circuits with two or more inputs and one or more outputs,
resulting by combining various types of gates. Their basic function is to
accept a binary word (code) as an input and create a different binary word as
an output. A typical decoder is the so-called full adder (3 inputs-2 outputs)
implementing the addition of two one-digit numbers (Ai, Bi) taking into
consideration the status of any previous carry (Ci-1), resulting into the sum
(Si), and generating a new carry (Ci). The addition of two 1-digits numbers
and the corresponding truth table of full adder are shown below:
N full adders can be cascaded to form a unit for the addition of two N-digits
binary numbers. Decoders with any type of truth table can be constructed by
using simple or complicated combinations of gates. Implementation of Bool’s
algebra rules generally simplifies the overall design. Simple and useful
decoders are the so-called “2-to-4” and “3-to-8” decoders.
Multiplexers
Generally, multiplexers are circuits behaving like a controlled rotary switch,
i.e. any one of a number of inputs may be selected as output. In digital
electronics, a multiplexer is a combination of logic gates resulting into
circuits with two or more inputs (data inputs) and one output. The selection
of the channel to be read into the output is controlled by supplying a specific
digital word to a different set of inputs (select inputs). A typical 4 input
channels (D3-D0) digital multiplexer, and its corresponding truth table is
shown below: