Foundation Course

Digital Electronics
From Logic Gates to Sequential Systems

A comprehensive, structured guide to the building blocks of all digital systems — covering Boolean algebra, logic gates, combinational circuits, flip-flops, and number systems with real-world VLSI context.

6 In-Depth Topics
Beginner to Advanced
VLSI & Industry Relevant
Interactive Labs Included
All Topics

Choose Your Topic

Each topic builds on the previous one. Start from the top if you're new to digital electronics.

Topic 01
Number Systems & Conversions
Master binary, decimal, hexadecimal, and octal systems. Covers radix conversion, 2's complement arithmetic, Grey codes, BCD, IEEE 754 floating point, and endianness — the foundational language of all digital hardware.
Binary Hex 2's Complement IEEE 754
Start Learning
Topic 02
Boolean Algebra Laws
Understand the mathematical framework behind all logic circuits. Covers identity, null, idempotent, complement, commutative, associative, distributive, absorption laws, De Morgan's theorems, the consensus theorem, and practical K-Map minimization.
De Morgan's K-Maps SOP / POS Minimization
Start Learning
Topic 03
Logic Gates & Universal Gates
Deep dive into AND, OR, NOT, XOR, XNOR gates and truth tables. Explores universal gate theory — how NAND and NOR gates alone can implement any Boolean function — and the difference between TTL and CMOS implementations.
NAND NOR XOR CMOS vs TTL
Start Learning
Topic 04
Combinational Circuits
Explore circuits where the output depends purely on current inputs. Covers half adders, full adders, ripple carry vs carry look-ahead adders, multiplexers (MUX), demultiplexers, decoders, encoders, priority encoders, and magnitude comparators.
Adders MUX Decoder Priority Encoder
Start Learning
Topic 05
Flip-Flops & Sequential Logic
Understand how digital circuits store state over time. Covers SR, JK, D, and T flip-flops, the difference between level-triggered latches and edge-triggered flip-flops, master-slave architecture, timing parameters (setup, hold, propagation delay), and metastability.
SR / JK / D / T Edge Trigger Metastability Registers
Start Learning
Topic 05 · Deep Dive
D Flip-Flop — How It Works Internally
Gate-by-gate and transistor-by-transistor breakdown of a D flip-flop. From SR latch → gated D latch → master-slave DFF → CMOS transmission gates (20T). Covers edge-triggering, setup/hold timing, and metastability with an interactive waveform lab.
NAND Gate Level CMOS (20T) Setup / Hold Metastability
Explore Deep Dive
Topic 07 · Deep Dive
Carry Lookahead Adder (CLA)
Understand why ripple-carry is slow and how CLA eliminates the carry chain delay. Covers Propagate/Generate logic, 2-level carry equations, Block CLA, Kogge-Stone and Brent-Kung prefix trees, plus interactive ripple vs CLA speed comparison.
P & G Logic Prefix Trees Kogge-Stone Verilog
Explore Deep Dive
Topic 06
Counters – Synchronous, Ripple & Mod-N
Synchronous vs asynchronous (ripple) counters, up/down counters, Mod-N, BCD counter, ring counter, and Johnson counter — with state tables, timing diagrams, interactive visualizer, and complete Verilog for every type.
Synchronous Mod-N / BCD Ring / Johnson Verilog
Start Learning
Topic 09
Shift Registers – SISO, SIPO, PISO & PIPO
All four shift register types, universal shift register, bidirectional operation, ring and Johnson counters — with an interactive 8-bit simulator, Verilog for every type, and VLSI applications including scan chains, SPI, and LFSR.
SISO / SIPO PISO / PIPO Universal SR Verilog
Start Learning
Topic 12
Half Adder & Full Adder
Half adder (S=A⊕B, C=AB) to full adder to 4-bit ripple carry adder to adder-subtractor — with inline SVG circuit diagrams, interactive 4-mode simulator, Verilog for every type, and adder type comparison (RCA, CLA, Kogge-Stone).
Half / Full Adder Ripple Carry Subtractor Verilog
Start Learning
Topic 11
Encoders & Decoders
Priority encoder, 2-to-4 and 3-to-8 decoders, BCD-to-7-segment display decoder, binary-to-Gray code — with three interactive simulators, Verilog for every type, and VLSI applications in interrupt controllers and memory address decoding.
Priority Encoder BCD-to-7-Seg Gray Code Verilog
Start Learning
Topic 10
Multiplexers & Demultiplexers
2:1, 4:1, 8:1 MUX with interactive simulator, MUX as universal logic element, tree expansion from smaller MUXes, DEMUX operation, and Verilog for all types. Includes VLSI applications: pipeline forwarding, clock MUX, bus selection.
2:1 / 4:1 / 8:1 Universal Logic DEMUX Verilog
Start Learning
Topic 27
Digital-to-Analog Converter (DAC)
R-2R ladder network, weighted resistor, current steering, PWM DAC, key specs (settling time, glitch energy, monotonicity, INL/DNL) — with an interactive 8-bit bit-toggle simulator and Verilog models.
R-2R LadderSettling TimeMonotonicityVerilog
Start Learning
Topic 25
Synchronous FIFO Design
Write/read pointer arithmetic, the MSB trick for full and empty detection, parameterized Verilog (power-of-2 depth), simultaneous read+write, fall-through vs registered read, and depth sizing for bursts.
MSB TrickPointer LogicParameterizedVerilog
Start Learning
Topic 26
Analog-to-Digital Converter (ADC)
Sampling theorem, quantization error, LSB size, SNR formula, Flash/SAR/Sigma-Delta/Pipeline ADC types, ENOB, INL, DNL — with interactive quantization simulator and Verilog SAR control logic.
SAR / Flash / ΣΔQuantizationENOBVerilog
Start Learning
Topic 24
Pulse Width Modulation (PWM)
Duty cycle, frequency, resolution (8/16-bit), counter-based generation, servo control (1–2ms), fan controller, and Verilog — with an interactive waveform visualizer showing V_avg and threshold.
Duty CycleCounter-BasedServo / MotorVerilog
Start Learning
Topic 23
Clock Domain Crossing (CDC)
Metastability, MTBF formula, 2-FF synchronizer with DONT_TOUCH, Gray counter, async FIFO with Gray-coded pointers — covering all CDC techniques from single-bit to multi-bit bus crossing.
Metastability2-FF SyncGray CodeAsync FIFO
Start Learning
Topic 28
Single Port RAM — Sync, Async, All Read Modes
Write-first, read-first, no-change, async-read modes with Verilog code for each. Byte-enable RAM, BRAM inference attributes, read/write timing diagram, and interactive 16×8 memory simulator.
Write-FirstRead-FirstBRAMVerilog
Start Learning
Topic 34
Karnaugh Map Solver — 2/3/4 Variable
Interactive K-map solver: click cells to enter 0/1/X, groups auto-highlighted, SOP and POS expressions simplified instantly, Verilog assign generated. Covers grouping rules, Gray code ordering, don't-cares, and Boolean minimization.
K-MapSOP/POSBooleanInteractive
Open Solver
Topic 35
Mux & Demux — Multiplexer and Demultiplexer
Complete guide to multiplexers and demultiplexers: 2:1, 4:1, 8:1 mux, 1:4 demux, truth tables, Boolean equations, Verilog implementation (case, ternary, parameterized), FPGA usage, Boolean function implementation with mux, and interactive simulator.
MuxDemuxVerilogInteractive
Start Learning
Topic 36
Boundary Scan Test — JTAG IEEE 1149.1
Complete JTAG boundary scan tutorial: TAP controller 16-state FSM, boundary scan register (BSR) cells, EXTEST/INTEST/BYPASS/IDCODE instructions, BSDL file format, PCB interconnect fault detection, Verilog BSR cell implementation, and interactive TAP state explorer.
JTAGIEEE 1149.1TAPBSR
Start Learning
Topic 37
LPDDR4 / LPDDR5 — Low Power DDR Memory
Complete LPDDR4/4X/5/5X deep dive: bank architecture (8BG×2 banks), timing parameters (tCL, tRCD, tRP, tRFC), PHY interface, ZQ calibration, WCK clock, read latency diagram, bandwidth calculator, memory controller FSM in SystemVerilog, and power modes comparison.
LPDDR4LPDDR5PHYMemory
Start Learning
Topic 39
SISO SIPO PISO PIPO — All Shift Register Types
All 4 shift register types with diagrams, truth tables and Verilog: SISO (delay line/LFSR), SIPO (deserializer/UART RX), PISO (serializer/UART TX), PIPO (pipeline latch). Universal shift register + LFSR with XOR feedback for BIST/PRBS.
SISOSIPOPISOPIPOVerilog
Start Learning
Topic 40
Carry Propagation Adder — RCA, CLA, Carry Select, Kogge-Stone
Propagate (P = A XOR B) and generate (G = A AND B) equations, ripple carry chain diagram, all adder types compared (RCA, carry lookahead, carry select, prefix/Kogge-Stone), delay/area trade-offs, Verilog for RCA with generate loop, 4-bit CLA, and 8-bit carry select adder.
RCACLACarry SelectKogge-StoneVerilog
Start Learning
Topic 38
What is a GPU? — Graphics Processing Unit Explained
GPU vs CPU, CUDA cores, Streaming Multiprocessors, VRAM, HBM vs GDDR, Tensor Cores, NVIDIA Hopper/Blackwell/Ada Lovelace, AMD CDNA3/RDNA4, GPU chip design (die size, process node), and GPU in AI/ML workloads.
GPUCUDAAINVIDIAArchitecture
Start Learning
Topic 33
CAM — Content Addressable Memory
Binary CAM, ternary CAM (TCAM) with don't-care bits, match line logic, priority encoder, TLB use case, CAM + data RAM pairing, BCAM vs TCAM vs RAM comparison, and interactive 8-entry search simulator.
Binary CAMTCAMTLBVerilog
Start Learning
Topic 32
Register File — 2R1W, 2R2W, Forwarding
2R1W and 2R2W register file Verilog, read-during-write forwarding, RISC-V x0 hardwired-zero design, flip-flop vs SRAM comparison, testbench, and interactive 32×32-bit register explorer.
2R1WForwardingRISC-VVerilog
Start Learning
Topic 31
ROM — Synchronous, Async, $readmemh, LUT ROM
Async (combinational) ROM, synchronous ROM with registered output, $readmemh file init, case-based ROM, sine LUT example, LUT ROM vs BRAM ROM comparison, and interactive address explorer.
Sync ROM$readmemhLUT ROMVerilog
Start Learning
Topic 30
True Dual Port RAM — TDP RAM Verilog
Two fully independent read/write ports. Read-first, write-first, no-change collision modes, dual-clock TDP RAM, byte-enable per port, RAMB36E2 primitive inference, arbitration for write-write collision, and interactive 16×8 simulator.
TDP RAMCollision ModesRAMB36E2Verilog
Start Learning
Topic 29
Simple Dual Port RAM — SDP RAM Verilog
One dedicated write port and one dedicated read port. Single-clock read-first and write-first (address forwarding) modes, dual-clock async RAM, byte-enable write, collision handling, and interactive 16×8 simulator with separate write/read controls.
SDP RAMDual-ClockBRAMVerilog
Start Learning
Topic 26
What is FPGA?
Field-Programmable Gate Arrays explained: LUTs, BRAMs, DSP slices, CLBs, programmable routing. Interactive LUT truth table explorer, FPGA vs ASIC vs CPU comparison, and Verilog examples for real FPGA targets.
LUTBRAMDSP SliceFPGA vs ASIC
Start Learning
Topic 27
What is GPU?
GPU architecture explained: streaming multiprocessors, CUDA cores, warps, SIMT execution, Tensor Cores, HBM memory hierarchy. Interactive parallel thread simulator, GPU vs CPU comparison table, CUDA code examples.
SIMTCUDA CoresWarpTensor Core
Start Learning
Topic 22
Tri-state Buffers & Bus Design
High-Z state, bus contention, open-drain/wired-AND, bidirectional inout buses, I2C use case, and Verilog — with an interactive 4-driver bus simulator showing contention warnings.
High-ZBus ContentionOpen-DrainVerilog
Start Learning
Topic 21
ALU Design — 8-bit Arithmetic Logic Unit
8 operations (ADD/SUB/AND/OR/XOR/NOT/SHL/SHR), Z/C/V/N status flags, SUB via XOR+Cin, signed overflow detection, and full Verilog RTL — with an interactive 8-bit ALU simulator.
ADD / SUBFlags Z/C/V/NOverflowVerilog
Start Learning
Topic 20
Carry Lookahead Adder (CLA)
Generate/Propagate logic, expanded C1–C4 equations, O(log N) vs O(N) ripple carry comparison, 16-bit CLA chaining, and Verilog — with an interactive 4-bit CLA showing live carry and sum bits.
Generate / PropagateO(log N)CLA 16-bitVerilog
Start Learning
Topic 19
Digital Comparators — EQ, GT, LT
1-bit XNOR equality, magnitude comparison, 4-bit cascading (74HC85), signed vs unsigned, and Verilog — with an interactive 8-bit comparator showing live EQ/GT/LT/Zero flags.
EqualityMagnitude74HC85Verilog
Start Learning
Topic 18
SRAM vs DRAM & Memory Arrays
SRAM 6T cell vs DRAM 1T1C, ROM types (mask/flash/EEPROM), memory array organization, cache hierarchy (L1/L2/L3), and Verilog synchronous RAM, dual-port RAM, and ROM with interactive memory simulator.
SRAM / DRAMCacheROM / FlashVerilog
Start Learning
Topic 17
Pipelining in Digital Design
Pipeline stages, latency vs throughput tradeoff, data/structural/control hazards, forwarding, stalls, load-use hazard, and Verilog pipeline registers — with interactive diagram and throughput calculator.
Pipeline StagesHazardsForwardingVerilog
Start Learning
Topic 16
Timing Analysis — Setup, Hold & Slack
Setup time, hold time, slack calculation, critical path, clock skew, jitter, STA flow, SDC constraints, and violation fixes — with an interactive timing diagram and slack calculator.
Setup / HoldSlackSTASDC
Start Learning
Topic 15
Number Systems & 2's Complement
Binary, octal, hexadecimal, BCD, sign-magnitude, 1's and 2's complement arithmetic, overflow detection, and IEEE 754 floating point — with an interactive multi-base converter.
Binary / Hex 2's Complement BCD IEEE 754
Start Learning
Topic 14
Finite State Machine (FSM)
Mealy vs Moore models, state diagrams, state tables, traffic light controller, sequence detector, one-hot vs binary encoding, and 3-always-block Verilog RTL with interactive simulator.
Mealy / Moore State Diagram One-Hot Verilog
Start Learning
Topic 13
Build an 8-bit CPU from Scratch
Complete accumulator-architecture CPU: fetch-decode-execute cycle, T-state Moore FSM control unit, 13-instruction ISA, ALU with flags, and interactive simulator running real programs. Full Verilog RTL included.
ALU Control Unit ISA T-state FSM Verilog
Start Learning
Topic
8051 Microcontroller
Complete 8051 reference: internal architecture block diagram, 40-pin DIP pinout, memory map, all 21 SFRs, timer modes 0–3, interrupt vectors, UART baud rate calculation, full instruction set, and assembly code examples.
Architecture SFR Timers UART Assembly
Start Learning
Topic 08 · Deep Dive
LFSR – Linear Feedback Shift Register
From a XOR gate and flip-flop chain to pseudo-random sequences used in BIST, CRC, SERDES scramblers, and spread-spectrum. Covers Fibonacci vs Galois topology, primitive polynomials, maximal-length sequences, and an interactive step-by-step simulation.
m-Sequence Fibonacci / Galois BIST / CRC Verilog
Explore Deep Dive
⚡ Interactive Lab
Pipeline Hazard Lab
Live Gantt chart showing stall bubbles, forwarding resolving hazards, and branch flush. Step cycle by cycle or play at speed. Theory, timing diagrams, and Verilog hazard unit included.
RAW Hazard Forwarding Branch Flush CPI
Open Lab
🔁 Interactive Lab
Round-Robin Arbiter Lab
Watch the grant pointer rotate live. Toggle requests to trigger starvation in fixed-priority mode, then see round-robin fix it. Jain's fairness index updates in real time.
Round-Robin Fixed Priority Starvation Verilog
Open Lab
⚡ Interactive Lab
CDC Lab – Clock Domain Crossing
Animate the metastability window, watch 1-FF fail and 2-FF rescue it, simulate pulse sync and handshake sync, calculate MTBF live. The #1 SoC silicon bug made visible.
Metastability 2-FF Sync Pulse Sync MTBF
Open Lab
⚡ Interactive Lab
Pull-Up / Pull-Down Resistor Lab
Toggle switches live and watch voltage, current, and power update instantly. Floating input chaos demo, I2C open-drain wiring, and resistor value calculator — the circuit every engineer must understand.
Pull-Up Pull-Down I2C Open-Drain GPIO
Open Lab
🔁 Interactive Lab
FSM Lab — Moore vs Mealy
Clickable state diagrams for Moore and Mealy FSMs side by side. Watch the 1-cycle output latency difference on live waveforms. Sequence detector "101" + traffic light examples.
Moore Mealy State Diagram Verilog
Open Lab
⚡ Interactive Lab
AXI4 Handshake Lab
Live VALID/READY waveform simulator. Watch write & read channels handshake, toggle back-pressure, count stall cycles, and see efficiency drop — the #1 SoC bus interview topic.
VALID/READY Write Channel AXI4-Lite Verilog
Open Lab
⚗ Interactive Lab
Async FIFO Lab
Watch read & write pointers race on independent clocks. Gray code conversion bit by bit, 2-FF synchronizer pipeline live, and FULL/EMPTY flags triggering in real time — the #1 CDC interview topic.
Gray Code Dual-Clock CDC Verilog
Open Lab
⚗ Interactive Lab
Scrambler & Descrambler Lab
Put LFSR theory to work — watch bit-by-bit scrambling with PCIe (x²³+x²¹+1), SATA, and Ethernet polynomials. Animate the LFSR state register, verify self-cancellation, and export Verilog.
LFSR PCIe / SATA PRBS Verilog
Open Lab
Topic 06
Forward Error Correction (FEC)
Learn how digital systems detect and correct transmission errors without retransmitting data. Covers parity bits, Hamming codes, Shannon's channel capacity theorem, Hamming distance, Reed-Solomon, Turbo codes, and LDPC codes used in 5G and Wi-Fi 6.
Hamming Code Parity Reed-Solomon LDPC
Start Learning
Topic 28
Gray Code — Binary Conversion & Async FIFO
Unit-distance property, binary-to-Gray XOR formula, Gray-to-binary cascade decode, async FIFO pointer safety with 2-FF synchronizer, Verilog converter modules, and K-map ordering.
Unit DistanceXOR FormulaAsync FIFOVerilog
Start Learning
Featured Read
Transistor Size Evolution — From Finger to Atom
How the transistor shrank from 1 cm in 1947 to 2 nm in 2024 — smaller than DNA. Scale comparisons, full timeline, physics limits, and what comes next: carbon nanotubes, photonics, quantum.
Read the Story →
Featured · Animated
Is Moore's Law Dead? — The Honest Answer
An animated 50-year transistor chart, why Dennard scaling really died in 2006, the power wall, and what replaced pure shrinking — chiplets, 3D stacking, GAA and specialization.
See the Chart →
Featured · Interactive
Inside an iPhone — Who Makes Every Chip?
Tap any component — processor, display, camera, modem, battery — to see the IP and which company supplies it. Apple/TSMC, Sony, Samsung, Qualcomm, Broadcom, NXP and more, across 7 countries.
Explore →

What You Will Learn

By working through these topics, you'll build the complete foundation expected of a digital design or VLSI engineer.

Read & Write Any Number Base

Convert fluently between binary, hex, octal and understand signed representations used in processor design.

Simplify Boolean Expressions

Reduce complex logic expressions using algebraic laws and K-Maps to minimize gate count in hardware.

Design with Logic Gates

Build any function using only NAND or NOR gates, and understand how CMOS implements these physically.

Build Arithmetic Circuits

Design adders, subtractors, multiplexers, decoders, and understand how carry look-ahead eliminates bottlenecks.

Understand Sequential Logic

Know how flip-flops store state, why edge-triggering matters, and how metastability affects chip reliability.

Apply Error Correction Theory

Understand how Hamming codes, parity schemes, and LDPC codes protect data in communications and memory.

In Depth

How Digital Logic Works — From Transistors to Systems

Understanding digital electronics at this level — not just "AND gate outputs 1 when both inputs are 1" but why, how, and what happens at the physics level — is what separates engineers who can debug chip-level issues from those who can only follow recipes.

Why Binary? The Physics of Transistor Switching

Digital circuits use binary — 0 and 1 — not because engineers decided binary was mathematical elegant, but because MOSFET transistors have two stable operating states: fully off (high impedance, output pulled to VDD through a load → logic 1) and fully on (low impedance, output pulled to GND → logic 0). The region between these states — the linear or triode region — is unstable and dissipates power. Digital design keeps transistors out of this region by operating at voltage levels well above or below the switching threshold. This is why digital circuits are noise-immune: a 1.2V signal in a 1.8V system can still be correctly interpreted as logic 1, even with 200mV of noise riding on it.

Boolean Algebra: The Mathematics of Switch Networks

Boolean algebra — AND, OR, NOT operations on 0 and 1 — is not just abstract math. Each operation corresponds to a specific transistor network. AND corresponds to series NMOS transistors (both must conduct for the output to be pulled low). OR corresponds to parallel NMOS transistors (either can conduct). NOT corresponds to a single inverting stage. NAND and NOR are more efficient than AND and OR because they require fewer transistors (2 vs 3 for a 2-input gate) and are the basis of CMOS standard cell libraries. De Morgan's theorem — that a NAND is equivalent to NOT-OR and a NOR is equivalent to NOT-AND — allows any Boolean expression to be implemented with only NAND or only NOR gates, which is why these are called universal gates.

Combinational vs Sequential Logic: What is the Difference?

Combinational logic produces an output that depends only on its current inputs — there is no memory. A 4-to-1 multiplexer, a 4-bit adder, a priority encoder: all combinational. Sequential logic has memory — the output depends on both current inputs and previous state. Flip-flops are the fundamental sequential element: they capture a value on a clock edge and hold it until the next edge. The difference matters for VLSI design because combinational logic has timing paths (data must propagate through all the gates before the next clock edge) while sequential logic creates registers that bound those paths. The balance between combinational and sequential logic — how many stages, how many pipeline registers — is the core of RTL micro-architecture design.

K-Map Minimization: Why It Still Matters in the Era of Synthesis Tools

Karnaugh maps provide a visual method for minimizing Boolean expressions — grouping minterms into power-of-2 groups to eliminate variables. Modern synthesis tools (Design Compiler, Genus) do this automatically and much more efficiently than manual K-map analysis for large functions. But understanding K-map minimization — why a group of 4 eliminates 2 variables, why don't-care conditions can reduce logic — builds the mental model for understanding what synthesis tools are doing when they optimize your RTL. An engineer who understands K-maps understands why changing a combinational always block's case statement can reduce the critical path delay, and why the "synthesis attributes" like full_case and parallel_case exist.

The Foundation of All Digital Design

Digital electronics is the bedrock on which all modern computing is built. Whether you are designing a microprocessor, programming an FPGA, or verifying an ASIC, every skill traces back to a solid understanding of how transistors implement logic and how logic gates compose into systems.

This section of EcrioniX covers digital electronics with the depth and rigor expected in the semiconductor industry. Each topic is written to serve both students approaching the subject for the first time and working engineers who need a reliable reference. The explanations go beyond defining what each gate does — they explain the physics behind the transistor networks, the mathematical tools for simplifying logic, and the design patterns that lead to efficient, testable, synthesis-friendly digital circuits.

Topics progress naturally from the mathematical foundations (number systems and Boolean algebra) through physical gate implementations, to complete functional units like adders and decoders, and finally to sequential circuits that give hardware its memory and state. Each topic is self-contained but builds on the previous one — starting here and working forward produces a complete digital design foundation.

Topics Covered in This Section

  • Binary, Hex, Octal & Radix Conversions
  • 2's Complement & Signed Arithmetic
  • IEEE 754 Floating Point Standard
  • Boolean Laws & De Morgan's Theorems
  • Karnaugh Map (K-Map) Minimization
  • AND, OR, NOT, XOR, NAND, NOR Gates
  • Universal Gate Implementations (NAND/NOR)
  • TTL vs CMOS Logic Families
  • Half Adder, Full Adder & Carry Look-ahead
  • Multiplexers, Decoders & Priority Encoders
  • SR, JK, D & T Flip-Flops
  • Setup Time, Hold Time & Metastability
  • Parity, Hamming Code & FEC Standards