You are on page 1of 45

EC2L005 Digital Electronics Basic Electronics- SIF, SMS and SMMME

EC2L005: Basic Electronics


Date: 09-11-2017
Topic: Digital Electronics

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics-Number Systems Basic Electronics- SIF, SMS and SMMME

Number Systems
1. Basis For all Operations in Information Processing Systems.
2. Information is Divided into a Group of Symbols:
Example: 26 English Letters; 10 Decimal Digits; ASCII Code;
→ Basically Symbols and Codes
3. Conventional Arithmetic → Number System Based upon TEN
Units (0 to 9)
4. Why Arithmetic and Logic Circuits in Computing and Digital
Systems operate with only 0’s and 1’s?
Reason: Difficult to Design Circuits with Ten Distinct States.
5. Number System with the Basic Symbols 0 and 1 → BINARY
→ Just Two Discrete Values.
6. Binary Digit (Either 0 or 1) is Called a BIT.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics-Number Systems Basic Electronics- SIF, SMS and SMMME

7. A Group of Bits Used to Represent the Discrete Elements of


Information → Symbol.

8. Mapping of Symbols to a Binary Value← Binary Code.

9. Mapping Must be Unique.

Example: Decimal Digits 0 - 9 are Mapped to a Digital System


with a Code of FOUR Bits.
0 → 0000; 1 → 0001; 2 → 0010; 3 → 0011;
40100; 5 → 0101; 6 → 0110; . . . ; 9 → 1001

10. Digital System: System that Manipulates Discrete Elements of


Information that is Mapped Internally in Binary Form.
SES, IIT Bhubaneswar July 2017 P. R. Sahu
EC2L005 Digital Electronics- Decimal Number System Basic Electronics- SIF, SMS and SMMME

Decimal Number System


1. Introduction: Invention of Decimal Number system has been
the Most Important Factor in the Development of Science and
Technology.
2. Use of [Positional] Number Representation: → Value of Each
Digit is Determined by its Position in a Number.
3. Base (Radix): Number of Symbols that the Number System
Contains.
4. Symbols in Decimal System: TEN: 0,1,2,3,4,5,6,7,8,9 → It has
a Base (Radix) of 10.
5. Each Position in the Decimal System is 10 times MORE Signif-
icant than the Previous Position.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics- Decimal Number System Basic Electronics- SIF, SMS and SMMME

6. How to Determine the Numeric Value of a Decimal Number?


Step-1 → Multiply Each Digit of the Number by the Value of
the Position in which the Digit Appears
Step-2 → Add the Products.
7. Example:Number 123456 is interpreted as
(1 × 100000) + (2 × 10000) + (3 × 1000) + (4 × 100) + (5 × 10) +
(6 × 1)

→ 6 is the Least Significant Digit (LSD)

→ 1 is the Most Significant Digit (MSD).

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics- Decimal Number System Basic Electronics- SIF, SMS and SMMME

8. General Representation of a Number in a Number System with


a Radix r: Use Digits from 0 to r − 1
n
• Integer Number N: N = ∑ anrn, n = 0, 1, 2 . . . ,
n=0
an = A Digit between 0 and r − 1.
• Fractions (Numbers Between 0 and 1): N = a−1r−1 +a−2r−2 +
. . . , a−n+1r−n+1 + a−nr−n.

Example: Let Decimal Fraction N = 0.23456.

N = 0.2000 + 0.0300 + 0.0040 + 0.0005 + 0.00006,

a−1 = 2, a−2 = 3, a−3 = 4, a−4 = 5, a−5 = 6.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics-Binary Numbers Basic Electronics- SIF, SMS and SMMME

Binary Numbers
(a) The Binary Number has Radix, r = 2.
Only TWO Digits 0 and 1 are Needed.
(b) Like the Decimal System, Binary Number System is a Posi-
tional System.
Each Bit Position Corresponds to a Power of 2.
(c) Digital Systems Use the Binary Number System and Other
Number Systems Closely Related to it Almost Exclusively.
(d) Hence, Digital Systems Provide Conversion Between Deci-
mal and Binary Numbers.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics-Binary Numbers Basic Electronics- SIF, SMS and SMMME

(e) How Decimal Value of a Binary Number can be Obtained?


Step-1 → Multiply each Power of 2 by Either 1 or 0
Step-2 → Adding the Values Together.

(f) Example:Let a Binary Number N = 101011


The Decimal Equivalent is
N = 1 × 25 + 0 × 24 + 1 × 23 + 0 × 22 + 1 × 21 + 1 × 20.
(g) In binary, k bits can represent n = 2k symbols.
→ 3 bits can represent up to 8 symbols
→ 4 bits for 16 symbols etc.
(h) For N symbols to be Represented, the Minimum Number
of Bits Required is the Lowest Integer k that Satisfies the
Relationship 2k > N.
(i) Example: If N = 26, Minimum k is 5 since 25 = 32 > 26.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics- Octal Numbers Basic Electronics- SIF, SMS and SMMME

9. Digital Systems Operate only on Binary Numbers.


10. Since binary numbers are often very Long, TWO Shorthand
Notations, Octal and Hexadecimal, are Used for Representing
large Binary Numbers.
Octal Numbers
1. Octal systems use a Radix of 8. ⇒ It has Digits from 0 to 7.
2. Positional Value of Each Digit in a Sequence of Numbers:
Each Position of a Number is a Power of 8, and Each Position
is 8 times More Significant Than the Previous Position.

3. Example: Decimal Equivalent of the Octal Number 123.123.

N = (123.123)8
= 1 × 82 + 2 × 81 + 3 × 80 + 1 × 8−1 + 2 × 8−2 + 3 × 8−3.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics- Hexadecimal Numbers Basic Electronics- SIF, SMS and SMMME

Hexadecimal Numbers
1. Hexadecimal Numbering System has a Base of 16.
2. There are 16 symbols.
3. Decimal digits 0 to 9 are Used as the First Ten Digits.
4. Letters A, B, C, D, E and F, are Used to Represent the Values
10, 11,12,13,14 and 15, respectively.
5. Relationship Between Decimal, Binary, Octal and Hexadecimal
Number Systems:
Decimal Binary Octal Hexadecimal Decimal Binary Octal Hexadecimal
0 0000 00 0 8 1000 10 8
1 0001 01 1 9 1001 11 9
2 0010 02 2 10 1010 12 A
3 0011 03 3 11 1011 13 B
4 0100 04 4 12 1100 14 C
5 0101 05 5 13 1101 15 D
6 0110 06 6 14 1110 16 E
7 0111 07 7 15 1111 17 F

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics- Hexadecimal Numbers Basic Electronics- SIF, SMS and SMMME

1. Hexadecimal numbers are often used in describing the data in


computer memory.
2. A computer memory stores a large number of words, each of
which is a standard size collection of bits.
3. An 8-bit word is known as a Byte.
4. A hexadecimal digit may be considered as half of a byte.
5. Two hexadecimal digits constitute one byte
The rightmost 4 bits corresponding to half a byte,
The leftmost 4 bits corresponding to the other half of the byte.
Half-byte is called Nibble.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics - Negative Numbres Basic Electronics- SIF, SMS and SMMME

Negative Numbers
1. Method-1
(a) Negative Numbers are Generally Represented with Sign Mag-
nitude
⇒Reserve one Bit for the Sign and the Rest of Bits are Inter-
preted Directly as the Number.
(b) Example: In a 4 bit system, 0000 to 0111 can be used to Rep-
resent Positive numbers from +0 to +2n−1.
1000 to 1111 Represent Negative Numbers from -0 to −2n−1.
The two possible zero’s redundant and also it can be seen
that such representations are arithmetically costly.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics - Negative Numbres Basic Electronics- SIF, SMS and SMMME

2. Method-2
(a) By Radix and Radix-1 Complement
(b) Example: −k is represented as Rn − k.
(c) In the case of base 10 and corresponding 10’s complement
with n = 2, 0 to 99 are the possible numbers.
In such a system, 0 to 49 is reserved for Negative Numbers
and 50 to 99 are for Positive Numbers.
(d) +3 = +3
−3 = 102 − 3 = 97
3. 2’s Complement is a Special case of Complement Representa-
tion.
4. The negative number -k is equal to 2n − k.
5. In 4 bits system, positive numbers 0 to 2n − 1 is Represented by
0000 to 0111 and Negative Numbers −2n−1 to -1 is Represented
by 1000 to 1111.
SES, IIT Bhubaneswar July 2017 P. R. Sahu
EC2L005 Digital Electronics - Negative Numbres Basic Electronics- SIF, SMS and SMMME

6. Such a Representation has only One Zero and Arithmetic is


Easier. To Negate a Number Complement ALL Bits and Add 1
7. Example:
(119)10 = (01110111)2
Complementing All Bits and Adding 1 Will Result
10001000
00000001 Add 1
————
10001001
That is (10001001)2 = (−119)10

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics- Two’s Complement Numbers Basic Electronics- SIF, SMS and SMMME

Properties of Two’s Complement Numbers


1. X plus the complement of X equals 0.
2. There is one unique 0.
3. Positive numbers have 0 as their leading bit ( MSB )
4. Negatives have 1 as their MSB .
5. Range for an n-Bit Binary Number in 2’s Complement Repre-
sentation is from −2(n−1) to 2(n−1) − 1.
6. Complement of the Complement of a Number is the Original
Number.
7. Subtraction is done by addition to the 2’s complement of the
number.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics- Two’s Complement Numbers Basic Electronics- SIF, SMS and SMMME

8. Value of Two’s Complement Numbers


For an n-bit 2’s complement number the weights of the bits is
the same as for unsigned numbers except of the MSB .
For the MSB or sign bit, the weight is −2n−1. The value of the
n − bit 2’s complement number is given by:
A 2’s-complement = (an−1) × (−2n−1) + (an−2) × (2n−1) + . . . +
(a1) × (21) + a0
9. Example: What is the Value of the 4-bit 2’s complement num-
ber 1011?
= 1 × −23 + 0 × 22 + 1 × 21 + 1 = −8 + 0 + 2 + 1 = −5

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics- Two’s Complement Numbers Basic Electronics- SIF, SMS and SMMME

10. An n-bit 2’s complement number can converted to an m-bit


number where m > n by appending m − n copies of the sign bit
to the left of the number.
11. This process is called sign extension.
12. Example: Convert the 4-bit 2’s complement number 1011 to an
8-bit representation.
The Sign Bit (= 1) Must be Extended by Appending Four 1’s
to Left of the Number:
1011 4-bit 2’s-Complement = 111110118-bit 2’s-Complement
Now Verify That the Value of the 8-Bit Number is Still -5
Value of 8-bit number
= −27 + 26 + 25 + 24 + 23 + 2 + 1
= −128 + 64 + 32 + 16 + 8 + 2 + 1
= −128 + 123 = −5

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics- Two’s Complement Numbers Basic Electronics- SIF, SMS and SMMME

13. Addition of Two Binary Numbers: Similar to Decimal Number


Addition, Two Binary Numbers are Added by Adding Each
pair of Bits Together with Carry Propagation.
14. Example:
Carry = 100 101111000
X= 190 10111110
Y= 141 10001101
− − − − − − − − − − − − − − − −− − − −−
X +Y = 331 101001011

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics- Two’s Complement Numbers Basic Electronics- SIF, SMS and SMMME

15. Subtraction of Two Binary Numbers:


Similar to Addition, Two Binary Numbers are Subtracted by
Subtracting Each Pair of Bits Together with Borrowing (where
needed)
16. Example:
Borrow 0 − 12 − 0 001111100
X 229 11100101
Y 46 00101110 (1)
− − − − − − − − − − − − − −− − − − − − − − − −
X −Y 183 10110111

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Digital Electronics- Two’s Complement Numbers Basic Electronics- SIF, SMS and SMMME

17. Two’ Complement Addition/Subtraction


18. Example:
4 0100 − 2 1110
− 7 1001 − 6 1010
−−−−− −−−−− −− − − − − − −−
− 3 1101 − 8 11000
19. Overflow Occurs if Signs (MSBs) of Both Operands are the
Same and the Sign of the Result is Different.
20. Overflow can also be detected if the carry in the sign position is
different from the carry out of the sign position. Ignore carry
out from MSB.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


Digital Electronics-Conversion among Number
EC2L005 Systems Basic Electronics- SIF, SMS and SMMME

Conversion of Numbers from One Number System to Another


1. Radix Divide and Multiply Method is Generally Used
2. There is a general procedure for the operation of converting a
decimal number to a number in base r.
3. If the number includes a radix point, it is necessary to separate
the number into an integer part and a fraction part, since each
part must be converted differently.
4. Conversion of a decimal integer to a number in base r is done
by dividing the number and all successive quotients by r and
accumulating the remainders.
5. Conversion of a decimal fraction: Do repeated multiplication
by r and accumulate the integers instead of remainders.
6. Integer part - repeated divisions by r yield LSD to MSD
7. Fractional part - repeated multiplications by r yield MSD to
LSD
SES, IIT Bhubaneswar July 2017 P. R. Sahu
Digital Electronics-Conversion among Number
EC2L005 Systems Basic Electronics- SIF, SMS and SMMME

8. Example: Conversion of Decimal 23 to Binary: Divide Decimal


Value by 2 (the base) Until the Value is 0
Integer Remainder
23
11 1 → LSB
5 1
2 1
1 0
0 1 → MSB
The answer is 2310 = (10111)2

SES, IIT Bhubaneswar July 2017 P. R. Sahu


Digital Electronics-Conversion among Number
EC2L005 Systems Basic Electronics- SIF, SMS and SMMME

9. Rule:
Step-1:
Divide the Number by 2; Keep Track of Remainder;
Repeat with Dividend Equal to Quotient until Zero;
First remainder is Binary LSB and Last is MSB.

Step-2: Conversion from Decimal Integers to any Base-r:


As in the above Example, Except that Division is by r Instead
of 2.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


Digital Electronics-Conversion among Number
EC2L005 Systems Basic Electronics- SIF, SMS and SMMME

10. Example: Convert (0.7854)10 to Binary.


0.7854 × 2 = 1.5708; a−1 = 1
0.5708 × 2 = 1.1416; a−2 = 1
0.1416 × 2 = 0.2832; a−3 = 0
0.2832 × 2 = 0.5664; a−4 = 0
The answer is (0.7854) 10 = (0.1100) 2
11. Rule: Step-1: Multiply fraction by two; keep track of integer
part; Repeat with multiplier equal to product fraction; first
integer is MSB , last is the LSB; conversion may not be exact;
a repeated fraction.
12. The conversion from decimal fraction to any base-r system is
similar to this above example, except the multiplication is done
by r instead of 2.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


Digital Electronics-Conversion among Number
EC2L005 Systems Basic Electronics- SIF, SMS and SMMME

13. Conversion of Decimal Numbers with both Integer and Frac-


tion Parts:
Convert the Integer and the Fraction Separately and then Com-
bine the Two Answers.
14. Example (23.7854)10 = (10111.1100)2
15. Conversion of a Binary Number to Octal Two Steps as Below
Step-1: Group the number of bits into 3’s starting at least sig-
nificant symbol. If the number of bits is not evenly divisible by
3, then add 0’s at the most significant end.
Step-2: Write the corresponding 1 octal digit for each group.
16. Example:
(100010111)2 → 100 − 010 − 111 → 4 − 2 − 7 = (427)8

(10101110)2 = X10 − 101 − 110 → 2 − 5 − 6 = (256)8.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


Digital Electronics-Conversion among Number
EC2L005 Systems Basic Electronics- SIF, SMS and SMMME

17. Conversion of a Binary Number to Hex: Following Two Steps


Step-1: Group the number of bits into 4’s starting at least sig-
nificant symbol. If the number of bits is not evenly divisible by
4, then add 0’s at the most significant end.

Step-2: Write the corresponding 1 hex digit for each group.


18. Example: (1001111001110000)2 → 1001−1110−0111−0000 →
9 − E − 7 − 0 = (9E70)16.
(1111110100011)2 → xxx1 − 1111 − 1010 − 0011 → 1 − F − A −
3 = (1FA3)16.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


Digital Electronics-Conversion among Number
EC2L005 Systems Basic Electronics- SIF, SMS and SMMME

19. Hex to Binary Conversion: Write Down the 4 bit Binary code
for each Hexadecimal Digit
20. Example:
(39C8)16 → 0011 − 1001 − 1100 − 1000 = (1110011100)2.
21. Octal to Binary Conversion:
Step-1: write down the 8 bit binary code for each octal digit.
22. Hex to Octal Conversion: Two Steps.
Step-1: First the Hex to Binary.
Step-2 Convert Binary to Octal.
23. Decimal to Hex Conversion: Two Steps.
Step-1: First the decimal to binary
Step-2: Convert Binary to Hex.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Boolean Algebra Basic Electronics- SIF, SMS and SMMME

Boolean Algebra
1. Digital circuits are called switching circuits, digital circuit func-
tions are called switching functions and the algebra is called
switching algebra.
2. The algebraic system known as Boolean algebra named after
the mathematician George Boole.
3. George Boole Invented multi-valued discrete algebra (1854) and
E. V. Huntington developed its postulates and theorems (1904).

4. Historically, the theory of switching networks (or systems) is


credited to Claude Shannon, who applied mathematical logic
to describe relay circuits (1938).
5. Relays are controlled electromechanical switches → Replaced
by electronic controlled switches called Logic Gates.

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Boolean Algebra Basic Electronics- SIF, SMS and SMMME

6. A special case of Boolean Algebra known as Switching Alge-


bra is a useful mathematical model for describing the combi-
national circuits.
7. Boolean algebra Applied to the Design of Digital Systems? Through
Implementation of Following Set of Operations.
8. Huntington ’s Postulates
Closure: If X and Y are in set (0, 1) then operations X +Y and
X ·Y are also in set (0, 1)
Identity: X + 0 = X and X.0 = 0.
Distributive: X · (Y + Z) = (X ·Y ) + (X · Z)
X + (Y · Z) = (X +Y ) · (X + Z)
Complement: X + X̄ = 1; X · X̄ = 0
Note: For each property, one form is the dual of the other;

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Boolean Algebra Basic Electronics- SIF, SMS and SMMME

9. Theorems Derived form the above Postulates:


Associative: X + (Y + Z) = (X +Y ) + Z
X · (Y · Z) = (X ·Y ) · Z
Idempotence: X · X = X; X + X = X
Absortion: X + (X ·Y ) = X; X · (X +Y ) = X
Simplification: X + (X̄ ·Y = X +Y
X · (X̄ +Y = X ·Y
Demorgans: X +Y ¯ = X̄ · Ȳ ; X ¯·Y = X̄ + Ȳ

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Boolean Algebra Basic Electronics- SIF, SMS and SMMME

Switching Algebra Operations


Three Primary Operations: NOT, AND and OR.

NOT: Unary Operation


Complement or Inversion Operation. Usually shown as over-

bar X̄, other forms are X and ∼ X.
Truth Table and Symbol:

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Boolean Algebra Basic Electronics- SIF, SMS and SMMME

AND: Binary Operation


Also known as the Conjunction Operation;
Output is TRUE (1) only if all inputs are TRUE.
Algebraic operator is DOT (·).
Truth Table and Symbol:

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Boolean Algebra Basic Electronics- SIF, SMS and SMMME

OR: Binary Operation


Also known as the Disjunction Operation.
Output is TRUE (1) if any ONE Input is TRUE.
Algebraic Operator is PLUS Sign (+).
Truth Table and Symbol:

10. Precedence of Evaluation:


Order of Operation in Algebraic Expression: NOT-AND-OR

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Boolean Algebra Basic Electronics- SIF, SMS and SMMME

11. Operators Derived from NOT-AND-OR

(a) NAND: NOT-AND


Truth Table and Symbol:

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Boolean Algebra Basic Electronics- SIF, SMS and SMMME

(b) NOR: NOT-OR


Truth Table and Symbol:

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Boolean Algebra Basic Electronics- SIF, SMS and SMMME

(c) XOR: Exclusive-OR


Truth Table and Symbol:

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Boolean Algebra Basic Electronics- SIF, SMS and SMMME

(d) XNOR: Exclusive-NOR


Truth Table and Symbol:

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Boolean Algebra Basic Electronics- SIF, SMS and SMMME

12. Minimal Logic Operator Set:


Obtain NOT-AND-OR Operations from either NAND or NOR
Gates.
(a) Use Only NAND Gate to get NOT-AND-OR Operations

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Boolean Algebra Basic Electronics- SIF, SMS and SMMME

(b) Use Only NOR Gate to get NOT-AND-OR Operations

SES, IIT Bhubaneswar July 2017 P. R. Sahu


Implementation of Boolean Functions
EC2L005 using Various Logic Gates Basic Electronics- SIF, SMS and SMMME

Implementation of Boolean Functions using Various Logic Gates:

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Combinatorial Circuits Basic Electronics- SIF, SMS and SMMME

Combinatorial Circuits

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Sequential Circuits Basic Electronics- SIF, SMS and SMMME

Sequential circuits

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Registers and Counters Basic Electronics- SIF, SMS and SMMME

Registers and Counters from functional viewpoint

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 Programmable Processors and Microcontrollers Basic Electronics- SIF, SMS and SMMME

Concept of Programmable Processors and Microcontrollers

SES, IIT Bhubaneswar July 2017 P. R. Sahu


EC2L005 End Sem Exam Syllabus Basic Electronics- SIF, SMS and SMMME

End Sem Exam Syllabus:

SES, IIT Bhubaneswar July 2017 P. R. Sahu

You might also like