Logic Gates and Hardware
-
Representing Logical Values as Signals
A digital circuit interprets ranges of physical signal values as logic levels so gates can compose reliably.
-
Reading a Logic Gate's Truth Table
A gate truth table gives the steady-state output for each possible combination of Boolean input levels.
-
Building an OR Gate from NAND
A NAND gate can act as an inverter with its inputs tied together. Applying that operation to both inputs lets another NAND produce OR.
-
XOR as a One-Bit Inequality Test
An exclusive-or gate outputs one when exactly one input is one. With two single bits, this is the condition that they differ.
-
A Half Adder for Two Bits
A half adder emits a sum bit and carry bit for adding two single-bit inputs with no incoming carry.
-
A Full Adder with an Incoming Carry
A full adder combines two operand bits with an incoming carry from a lower position and produces a sum and outgoing carry.
-
Following a Carry Through an Adder
Connecting full adders lets each position's carry feed the next higher position. A carry may need to traverse several gate stages before the result settles.
-
Selecting an Input with a Multiplexer
A multiplexer connects one selected data input to a shared output. Select lines encode which input the logic delivers.
-
Decoding a Binary Choice to One Output
A decoder maps an input code to a signal on one selected output line when enabled.
-
Combinational Logic and Its Inputs
A combinational network produces outputs determined by current input values once signals settle, independent of earlier states.
-
Sequential Logic Remembers State
A sequential circuit's outputs or next state can depend on retained bits as well as current inputs.
-
Latches and Edge-Triggered Flip-Flops
A level-sensitive latch may follow its input while enabled. An edge-triggered flip-flop updates according to a selected clock transition.
-
Loading or Holding a Register
A register groups state bits so an update can store one multibit value together under a common control rule.
-
A Binary Counter as a State Machine
A clocked counter stores a bit pattern and replaces it with the next pattern under its enable and reset rules.
-
Reading a Finite-State Circuit
A finite-state circuit stores a coded state and maps that state and current inputs to a next state and outputs.
-
Mealy and Moore Output Rules
A Moore model gives outputs from retained state. A Mealy model can also use the current input in the output function.
-
Setup and Hold Around a Sampling Edge
Setup and hold describe required stable input intervals before and after a storage element's sampling event.
-
Receiving a Single Asynchronous Control Bit
A digital input arriving independently of a receiver's clock can change near a sampling edge, so crossing that boundary needs a deliberate circuit.
-
Clock Period and Clock Frequency
Period measures time per clock cycle, and frequency measures cycles per unit time. They are reciprocals for a regular clock.
-
Byte Addresses and Word-Sized Values
A byte-addressed memory assigns each byte its own address. A multibyte value occupies several consecutive addresses.
-
Address Width and Addressable Positions
Calculate the number of addressable positions from the address width and the storage unit per position.
-
Reading and Writing an Addressed Memory Cell
An addressed memory interface uses address, data, and control information to select which stored value to observe or modify.
-
Registers and Addressed Memory
Registers hold values directly used by a circuit's local operations. A memory array stores a larger collection selected by an address.
-
Fetch, Decode, and Execute in a Simple Processor
A basic processor reads an instruction from an address, interprets its fields, and performs the operation specified by those fields.
-
Reading Fields of a Toy Instruction
An instruction format assigns bit fields to its operation and operands. Their meanings depend on that instruction set.
-
The Program Counter and Branch Targets
A program counter identifies which instruction is fetched under a processor's execution model. Branches can change the next chosen address.
-
Instruction Latency and Throughput
Latency measures the time from one operation's start to its result. Throughput measures how often results can be completed under a sustained workload.
-
A Data Dependency in a Processor Pipeline
One instruction depends on another when it needs a value the earlier instruction has yet to produce.
-
When Two Addresses Refer to the Same Resource
A memory map can expose one resource through more than one address. Such aliases differ from two independent storage locations.
-
Verifying a Small Logic Circuit with Examples
For a combinational circuit with few input bits, exhaustive input enumeration can compare its settled outputs with a specification.