0% found this document useful (0 votes)
30 views32 pages

Eln PPT Module 1

Uploaded by

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

Eln PPT Module 1

Uploaded by

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

DEPARTMENT

OF
ELECTRONICS & COMMUNICATION ENGINEERING

BASIC ELECTRONICS

MODULE-1 Digital Electronics


BY
Prof M SHRUTHI
 Module – 1 Contents
 Digital Electronics 1
• Introduction to Number Systems
• Binary Number System
• Decimal Number System
• Octal Number System
• Hexadecimal Number System
• Conversion from one number system to another number system
• 1’s and 2’s complement method and their arithmetic
 Digital Electronics 2
• Binary logic functions
• Boolean algebra
• De-Morgan’s Theorem
• Logic gates
• Realization of Boolean functions using basic gates
• Implementation of logic gates as half & full adder
Digital and Analog: Basic Concepts
Analog signal A continuously varying signal (voltage or current) is called an analog signal.
Digital signal A signal (voltage or current) that can have only two discrete values is called
a digital signal.

(a) Analog waveform (b) Digital waveform


• Number systems include decimal, binary, octal and
hexadecimal
• Each system have four number base

Number System Base Symbol


Binary Base 2 B
Octal Base 8 O
Decimal Base 10 D
Hexadecimal Base 16 H

4
Base-N Number System
• Base N
• N Digits: 0, 1, 2, 3, 4, 5, …, N-1
• Example: 1045N
• Positional Number System
n 1 4 3 2 1 0
• N N N N N N
d n  1  d 4 d3 d 2 d1 d 0
• Digit do is the least significant digit (LSD).
• Digit dn-1 is the most significant digit (MSD).
5
Decimal Number System
• Base 10
• Ten Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
• Example: 104510
• Positional Number System

n 1 4 3 2 1 0
10 10 10 10 10 10
d n  1  d 4 d3 d 2 d1 d 0
• Digit d0 is the least significant digit (LSD).
• Digit dn-1 is the most significant digit (MSD). 6
Binary Number System
• Base 2
• Two Digits: 0, 1
• Example: 10101102
• Positional Number System
n 1 4 3 2 1 0
2 2 2 2 2 2
bn  1  b4 b3 b2 b1 b0

• Binary Digits are called Bits


• Bit bo is the least significant bit (LSB).
• Bit bn-1 is the most significant bit (MSB). 7
Octal System
• Computer scientists are often looking for shortcuts
to do things
• One of the ways in which we can represent binary
numbers is to use their octal equivalents instead
• This is especially helpful when we have to do fairly
complicated tasks using numbers
• The octal numbering system includes eight base
digits (0-7)
• After 7, the next placeholder to the right begins with
a “1”
• 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13 ...
8
Decimal Number System
• The Decimal Number System uses base 10. It includes
the digits {0, 1,2,…, 9}. The weighted values for each
position are:

Base

10^4 10^3 10^2 10^1 10^0 10^-1 10^-2 10^-3

10000 1000 100 10 1 0.1 0.01 0.001

left of the decimal point Right of decimal point


9
Converting Base-2 to Base-10

(1 0 0 1 1)

OFF

OFF
ON
ON/OFF

ON

ON
2
Exponent: 24 23 22 21 20

n:
16 0 0 2 1
Calculatio + + + + =

(19)10
10
Hexadecimal system
• Each digit appearing to the left of the decimal point represents a value
between zero and nine times power of ten represented by its position in
the number.
• Digits appearing to the right of the decimal point represent a value
between zero and nine times an increasing negative power of ten.
• Example: the value 725.194 is represented in expansion form as follows:
• 7 * 10^2 + 2 * 10^1 + 5 * 10^0 + 1 * 10^-1 + 9 * 10^-2 + 4 * 10^-3
• =7 * 100 + 2 * 10 + 5 * 1 + 1 * 0.1 + 9 * 0.01 + 4 * 0.001
• =700 + 20 + 5 + 0.1 + 0.09 + 0.004
• =725.194

12
The Binary Number Base Systems
• Most modern computer system using binary logic. The
computer represents values(0,1) using two voltage levels
(usually 0V for logic 0 and either +3.3 V or +5V for logic
1).
• The Binary Number System uses base 2 includes only the
digits 0 and 1
• The weighted values for each position are :
Base

2^5 2^4 2^3 2^2 2^1 2^0 2^-1 2^-2

32 16 8 4 2 1 0.5 0.25
13
Number Base Conversion
• Binary to Decimal: multiply each digit by its weighted
position, and add each of the weighted values together
or use expansion formdirectly.
• Example: the binary value 1100 1010 represents :
• 1*2^7 + 1*2^6 + 0*2^5 + 0*2^4 + 1*2^3 + 0*2^2 +
1*2^1 + 0*2^0
• =1 * 128 + 1 * 64 + 0 * 32 + 0 * 16 + 1 * 8 + 0 * 4 + 1 *
2+0*1
• =128 + 64 + 0 + 0 + 8 + 0 + 2 + 0 =
• =202

14
Binary → hex/decimal/octal conversion

• Conversion from binary to octal/hex


• Binary: 10011110001
• Octal: 10 | 011 | 110 | 001=23618
• Hex: 100 | 1111 | 0001=4F116

• Conversion from binary to decimal


• 1012= 1×22 + 0×21 + 1×20 = 510
• 63.48 = 6×81 + 3×80 + 4×8–1 = 51.510
• A116= 10×161 + 1×160 = 16110
Decimal→ binary/octal/hex conversion

• Why does this work?


• N=5610=1110002
• Q=N/2=56/2=111000/2=11100 remainder 0

• Each successive divide liberates an LSB (least


significant bit)
The basics: Binary numbers

• Bases we will use


• Binary: Base 2
• Octal: Base 8
• Decimal: Base 10
• Hexadecimal: Base 16

• Positional number system


• 1012= 1×22 + 0×21 + 1×20
• 638 = 6×81 + 3×80
• A116= 10×161 + 1×160 1011 1011
+ 1010 – 0110
• Addition and subtraction 10101 0101
Sign-and-magnitude
• The most-significant bit (MSB) is the sign digit
• 0 ≡ positive
• 1 ≡ negative

• The remaining bits are the number’s magnitude


• Problem 1: Two representations for zero
• 0 = 0000 and also –0 = 1000

• Problem 2: Arithmetic is cumbersome


Ones-complement
Ones-complement
• Negative number: Bitwise complement positive
number
• 0011 ≡ 310
• 1100 ≡ –310

• Solves the arithmetic problem

• Remaining problem: Two representations for zero


Twos-complement
Twos-complement
• Negative number: Bitwise complement plus
one
• 0011 ≡ 310 –1 0
• 1101 ≡ –310 –2 1111 0000 +1

–3 1110 0001 +2
• Number wheel –4
1101 0010
+3
1100 0011
 Only one zero!
– 5 1011 0100 + 4
 MSB is the sign 1010 0101
digit –6 1001 0110 +5
 0 ≡ positive –7 1000 0111 +6
 1 ≡ negative –8 +7
Twos-complement (con’t)
• Complementing a complement  the original
number
• Arithmetic is easy
• Subtraction = negation and addition
• Easy to implement in hardware
Preamble-Logic gates

10/24/2024 LD-19EC3DCDEC- Module-1 24


Using switches:

AND gate OR gate

NOT gate
Preamble-Boolean Algebra

10/24/2024 LD-19EC3DCDEC- Module-1 26


DeMorgan’s Theorem
• DeMorgan’s Theorem 1: states that the complement of a product is
equal to the sum of the complements.
AB= A + B
A B AB A+B
0 0 1 1
0 1 1 1
1 0 1 1
1 1 0 0

DeMorgan’s Theorem 2: states that the complement of a sum is


equal to the product of the complements.
A+B=AB

A B A +B AB
0 0 1 1
0 1 0 0
1 0 0 0
1 1 0 0
Universality of NAND and NOR

Implementation of basic logic gates using only NOR


Implementation of basic logic gates using only NAND gates
gates
Half Adder:
• It is a combinational circuit that performs the addition of two bits,
this circuit needs two binary inputs and two binary outputs.
Truth table
Inputs Outputs

0 0 0 0

0 1 0 1

1 0 0 1

1 1 1 0
Full Adder
• It is a combinational circuit that performs the addition of three bits
(two significant bits and previous carry).
• It consists of three inputs and two outputs, two inputs are the bits to be added, the
third input represents the carry form the previous position.
Truth table for the full adder

Inputs Outputs

0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
FULL ADDER USING 2 HALF ADDER

Inputs Outputs

0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1

Truth table for the full adder

You might also like