Digital Electronics
Digital Electronics
Module 1: Number Systems and Codes, Signed Numbers, Logic Gates, and Logic Families
• To convert an octal number to binary, you translate each octal digit into its 3-bit
binary equivalent.
o For example: (56)₈ = (101 110)₂
o
• Each octal digit corresponds to a 3-bit binary value.
❖ Codes:
▪ ASCII (American Standard Code for Information Interchange): A 7-bit code (or 8-
bit extended) used to represent alphanumeric characters. Widely used in
computers and communication systems.
▪ Excess-3 Code: A non-weighted BCD code where each decimal digit is
represented by its BCD equivalent.
▪ Gray Code: A binary code where only one bit changes between successive values.
In pure binary coding or 8421 BCD then counting from 7 (0111) to 8 (1000)
requires 4 bits to be changed simultaneously. Gray coding avoids this since
only one bit changes between subsequent numbers.
❖ Parity Method: A method to detect errors in data transmission. Parity bits are added
to data to make the total number of '1' bits either even or odd.
❖ Signed Numbers: The leftmost bit represents the sign (0 for positive, 1 for negative).
The remaining bits represent the magnitude.
❖ 1's Complement: Example: Binary: 1010100; 1's complement: 0101011
❖ 2’s Complement: To find the 2's complement of a binary number, you first find
the 1's complement and then add 1 to the result. Example: Binary: 1000100;
1's complement: 0111011
2's complement: 0111100
❖ Basic Logic Gates:
o AND: Output is 1 only if all inputs are 1.
o OR: Output is 1 if any input is 1.
o NOT: Inverts the input.
o NAND: Inverted AND.
o NOR: Inverted OR.
o XOR (Exclusive OR): Output is 1 if inputs are different.
o XNOR (Exclusive NOR): Inverted XOR.
Universal Gates: NAND and NOR gates are universal gates, meaning any logic function can
be implemented using only NAND or only NOR gates.
• CMOS:
❖ Lower power consumption.
❖ Higher noise immunity.
❖ Lower static power dissipation.
❖ Slower switching speed at low frequencies, but faster at high frequencies.
• TTL:
❖ Higher power consumption.
❖ Lower noise immunity.
❖ Higher static power dissipation.
❖ Faster switching speed in some specific applications.
There are two canonical forms for Boolean expressions: Sum-Of-Products (SOP) and
Product-Of-Sums (POS).
Example
If a circuit is designed so that a particular set of inputs can never happen, we call this set of
inputs a don’t care condition.
HALF ADDER
FULL ADDER
HALF SUBTRACTOR
FULL SUBTRACTOR
• Parity Code Method: A parity bit is an extra bit included in binary message to make
total number of 1’s either odd or even. Parity word denotes number of 1’s in a binary
string.
• Multiplexer: A Multiplexer or Mux is a device that has many inputs and a single
output. It selects a single input to the output from several inputs.
8 = 23
IC 7447
• Encoder:
S-RFlipflop
S-R Flipflop D Flipflop
In SR Flip Flop S=R=1 should be avoided. To overcome that JK Flip Flop was developed.
▪ Modulus of a counter is the total number of states through which a counter can progress.
▪ Two types of counters:
❖ Synchronous (parallel) counters Up/Down counter
❖ Asynchronous (ripple) counters A binary counter can represent 2^N states, where N is the number of bits
(flip flops).
• Programmable Logic Devices (PLDs): PLDs are ICs that can be configured by the user to
implement various logic functions.
o Types
▪ PAL (Programmable Array Logic): A PLD with a programmable AND array and a fixed OR
array.
▪ PLA (Programmable Logic Array): A PLD with both programmable AND and OR arrays,
offering more flexibility.
▪ FPGA (Field-Programmable Gate Array): A more complex PLD with configurable logic
blocks and interconnects.
Verilog is a hardware description language used to model and design digital circuits.