Logic gates are the basic building blocks of digital electronics. Each gate performs a specific logical operation on one or more inputs to produce an output.
A | B | A ⊕ B ------------- 0 | 0 | 0 0 | 1 | 1 1 | 0 | 1 1 | 1 | 0
[Illustration of each logic gate symbol – can be added as images if required]
These laws are used to simplify expressions in Boolean algebra.
Given: (A + B)' Apply: A' ⋅ B' So, (A + B)' = A' ⋅ B'
These are rules used to simplify Boolean expressions.
Expression: A + AB Apply: A(1 + B) = A ⋅ 1 = A Final Answer: A
SOP is the sum (OR) of multiple product (AND) terms.
Example: F = A'B + AB'
POS is the product (AND) of multiple sum (OR) terms.
Example: F = (A + B)(A' + C)
K-Map is used to simplify Boolean expressions by organizing them into a table format.
Example for 2 variables:
| A | B | Output | |---|---|--------| | 0 | 0 | 0 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 0 | This is XOR logic. K-map grouping simplifies to A'B + AB'
[Draw K-map grids and groupings – image or diagram can be inserted]
A multiplexer selects one input from multiple inputs and forwards it to the output using selection lines.
Inputs: I0, I1, I2, I3 Select lines: S0, S1 Output: Y = I0.(S1'.S0') + I1.(S1'.S0) + I2.(S1.S0') + I3.(S1.S0)
S1 | S0 | Output (Y) -------------------- 0 | 0 | I0 0 | 1 | I1 1 | 0 | I2 1 | 1 | I3
[Block diagram of 4-to-1 MUX with 4 inputs, 2 selection lines, and 1 output]
A decoder converts binary data from 'n' input lines to a maximum of 2ⁿ unique output lines.
Inputs: A0, A1 Outputs: Y0 to Y3 Y0 = A1'.A0' ; Y1 = A1'.A0 ; Y2 = A1.A0' ; Y3 = A1.A0
A1 | A0 | Y3 Y2 Y1 Y0 --------------------- 0 | 0 | 0 0 0 1 0 | 1 | 0 0 1 0 1 | 0 | 0 1 0 0 1 | 1 | 1 0 0 0
[Diagram of 2 input lines connected to logic gates generating 4 outputs]
An encoder performs the reverse operation of a decoder. It converts 2ⁿ inputs into n output lines.
Inputs: D0 to D3 Outputs: A0, A1 A1 = D2 + D3 A0 = D1 + D3
D3 | D2 | D1 | D0 | A1 A0 ------------------------- 0 | 0 | 0 | 1 | 0 0 0 | 0 | 1 | 0 | 0 1 0 | 1 | 0 | 0 | 1 0 1 | 0 | 0 | 0 | 1 1
[Logic gate connections converting 4 input lines to 2 output lines]
An adder circuit adds binary numbers. Two types: Half Adder and Full Adder.
Inputs: A, B Sum = A ⊕ B Carry = A ⋅ B
A | B | Sum | Carry ------------------- 0 | 0 | 0 | 0 0 | 1 | 1 | 0 1 | 0 | 1 | 0 1 | 1 | 0 | 1
Inputs: A, B, Cin Sum = A ⊕ B ⊕ Cin Carry = (A ⋅ B) + (B ⋅ Cin) + (A ⋅ Cin)
A | B | Cin | Sum | Carry ------------------------- 0 | 0 | 0 | 0 | 0 0 | 1 | 0 | 1 | 0 1 | 0 | 0 | 1 | 0 1 | 1 | 0 | 0 | 1 0 | 0 | 1 | 1 | 0 0 | 1 | 1 | 0 | 1 1 | 0 | 1 | 0 | 1 1 | 1 | 1 | 1 | 1
[Full adder circuit using two half adders and OR gate]
A subtractor circuit subtracts binary numbers. Two types: Half Subtractor and Full Subtractor.
Inputs: A, B Difference = A ⊕ B Borrow = A' ⋅ B
A | B | Diff | Borrow --------------------- 0 | 0 | 0 | 0 0 | 1 | 1 | 1 1 | 0 | 1 | 0 1 | 1 | 0 | 0
Inputs: A, B, Bin Difference = A ⊕ B ⊕ Bin Borrow = A' ⋅ B + (A' ⊕ B) ⋅ Bin
A | B | Bin | Diff | Borrow --------------------------- 0 | 0 | 0 | 0 | 0 0 | 1 | 0 | 1 | 1 1 | 0 | 0 | 1 | 0 1 | 1 | 0 | 0 | 0 0 | 0 | 1 | 1 | 1 0 | 1 | 1 | 0 | 1 1 | 0 | 1 | 0 | 0 1 | 1 | 1 | 1 | 1
[Full subtractor using two half subtractors and OR gate]
ROM is non-volatile memory used to store firmware or permanent data that doesn't change frequently.
Used In: BIOS, embedded systems, calculators.
Diagram: [Block diagram showing address lines → ROM → Data Output]
PROM is a type of ROM that can be programmed once by the user after manufacturing.
Diagram: [PROM chip with programming fuses shown]
EPROM can be erased using ultraviolet light and reprogrammed.
Diagram: [EPROM with quartz window shown]
RAM is volatile memory used for temporary data storage while programs are running.
Diagram: [RAM block with address, data lines and control lines]
A hard disk is a magnetic storage device used for storing OS, software, files, etc.
Diagram: [Platter, spindle, actuator arm, read/write head]
A floppy disk is an older magnetic storage device used for small data transfer and backup.
Diagram: [Circular disk inside plastic casing with magnetic coating]
CD-ROMs are optical disks used for storing music, software, and other read-only data.
Diagram: [Laser lens reading circular track on CD surface]
Flip-flops are fundamental building blocks in digital electronics used to store binary data. A flip-flop is a bistable multivibrator with two stable states, used for storing one bit of information.
RS flip-flop has two inputs: R
(reset) and S
(set). The output changes based on the
input combination.
Truth Table:
R | S | Q | Q' |
---|---|---|---|
0 | 0 | Previous State | Previous State |
0 | 1 | 1 | 0 |
1 | 0 | 0 | 1 |
1 | 1 | Invalid | Invalid |
Diagram: [RS Flip-Flop symbol with reset and set inputs]
The D flip-flop is a modified version of the RS flip-flop, which eliminates the invalid state. It has a single
input: D
(data), and the output follows the value of the data input.
Truth Table:
D | Q | Q' |
---|---|---|
0 | 0 | 1 |
1 | 1 | 0 |
Diagram: [D Flip-Flop symbol with data input and Q output]
The JK flip-flop is a more versatile flip-flop. It has two inputs: J
and K
. It
combines the functionality of the RS flip-flop and adds the ability to toggle the output.
Truth Table:
J | K | Q | Q' |
---|---|---|---|
0 | 0 | Previous State | Previous State |
0 | 1 | 0 | 1 |
1 | 0 | 1 | 0 |
1 | 1 | Toggled | Toggled |
Diagram: [JK Flip-Flop symbol with J and K inputs]
Master-slave flip-flops are designed using two flip-flops connected in series, where the master flip-flop captures the input and the slave flip-flop holds the output, preventing race conditions.
Diagram: [Master-Slave Flip-Flop symbol with inputs and outputs]
The T flip-flop changes its state (toggles) with each clock pulse when the input T
is high (1).
Truth Table:
T | Q | Q' |
---|---|---|
0 | Previous State | Previous State |
1 | Toggled | Toggled |
Diagram: [T Flip-Flop symbol with T input and Q output]
Registers are used to store multiple bits of data in a digital system. A shift register is a type of register used for shifting data in or out of the register, usually used in data transmission and storage applications.
Diagram: [Shift Register symbol showing input, clock, output]
Counters are sequential circuits used to count events or clock pulses. They can be asynchronous or synchronous.
Example: 4-bit Synchronous Counter using JK Flip-Flops
Diagram: [Synchronous counter circuit with JK flip-flops]
The design methods of digital circuits are classified as synchronous and asynchronous:
Diagram: [Synchronous and Asynchronous block diagrams]
Memory in digital systems can be categorized into two primary types: Static RAM (SRAM) and Dynamic RAM (DRAM). Both are used for storing data but have different structures and properties.
SRAM uses bistable latches (flip-flops) to store data. The data is retained as long as the power is supplied, making it faster but more expensive compared to DRAM.
Basic Cell: A typical SRAM cell consists of four to six transistors forming a flip-flop that stores each bit of data.
Diagram: [SRAM cell diagram with 4 transistors]
DRAM stores each bit of data in a capacitor, which must be periodically refreshed to maintain the stored data. DRAM is slower than SRAM but cheaper and more dense, making it suitable for larger memory systems.
Basic Cell: A DRAM cell consists of one transistor and one capacitor for each bit of data.
Diagram: [DRAM cell diagram with a single transistor and capacitor]
Large memory systems are built by connecting multiple memory chips in parallel or series. Memory is typically organized in rows and columns, allowing for the selection of individual bits in a large memory space.
To address large memories, a memory controller is used to select rows and columns. Each memory chip has a specific address range, and the controller maps the address to the correct chip and location.
Diagram: [Memory chip addressing with multiple chips in parallel]
Memory chips can be selected using address lines and chip-select signals. The memory controller sends the appropriate signals to select the correct chip based on the address provided by the CPU.
Diagram: [Block diagram of chip selection and memory organization]
Associative memory, also known as content-addressable memory (CAM), is a type of memory that allows data to be accessed based on content rather than its address. In CAM, data is compared to a stored value, and if a match is found, the corresponding data is retrieved.
CAM consists of memory cells where each cell has a comparator that compares the input with the stored data. If a match is found, the address of the matching data is output.
Diagram: [Block diagram showing a CAM cell with comparator and address lines]
Cache memory is a small, high-speed memory that stores frequently accessed data. It acts as a buffer between the CPU and main memory, reducing the average time to access data from the main memory.
Diagram: [Cache memory organization with L1, L2, and L3 caches]
Virtual memory is a technique that uses a portion of the hard disk as an extension of RAM, allowing programs to use more memory than is physically available. Virtual memory is managed by the operating system using a page table that maps virtual addresses to physical addresses in RAM.
Page tables are used to map virtual addresses to physical addresses. Each page in virtual memory corresponds to a block in physical memory. The operating system manages page tables and performs paging to transfer data between RAM and the hard disk when needed.
Diagram: [Page table diagram showing virtual and physical address mapping]
A page fault occurs when a program accesses a page that is not currently in physical memory. When this happens, the operating system must load the page from the hard disk into RAM, causing a delay in execution.
Diagram: [Page fault flowchart showing the steps of handling a page fault]