Number Systems and Base Conversion
, r-1. Digital hardware uses radix 2 because two voltage levels are reliable; humans prefer radix 10; programmers also use radix 8 (octal) and radix 16 (hexadecimal) as compact notations for binary bit patterns.
DL · Short notes
17 short notes in syllabus order, about 142 minutes to read end to end.
, r-1. Digital hardware uses radix 2 because two voltage levels are reliable; humans prefer radix 10; programmers also use radix 8 (octal) and radix 16 (hexadecimal) as compact notations for binary bit patterns.
Unsigned binary encodes only non-negative integers. Processors also need negative values. Three classical encodings place a sign into a fixed-width bit pattern: sign-magnitude, ones' complement, and two's complement.
A binary code assigns a bit pattern to each symbol of a set (decimal digits, angles of a shaft encoder, and so on). Pure binary is efficient for arithmetic, but other codes are built for decimal I/O, for single-bit-change sequencing, or for self-complementing digit arithmetic.
Boolean algebra is the algebra of two-valued logic used to describe and simplify digital circuits. Variables take values in 0,1; the operations AND, OR and NOT correspond to series switches, parallel switches and inversion.
Every Boolean function has two canonical representations that are unique up to term order: the sum of minterms (canonical SOP) and the product of maxterms (canonical POS).
Algebraic minimization rewrites a Boolean expression using identities until literal count, term count, or gate count drops, without changing the truth table. It is the syllabus's first minimization technique: no map drawing, no tabular covering.
A Karnaugh map (K-map) is a truth-table layout in which adjacent cells differ by one variable, so that combining minterms becomes circling power-of-two blocks of 1s. It is the standard hand method for minimizing Boolean functions of up to four variables (sometimes five or six with care).
The Quine-McCluskey (QM) method finds all prime implicants of a Boolean function by systematically combining minterms, then selects a minimum cover with a prime-implicant chart.
A combinational circuit computes outputs from current inputs only: no memory, no clocks. Design means turning a worded specification into a gate network (or a chip-level connection of MSI blocks) whose truth table matches the specification.
Adders are the core combinational blocks of arithmetic. A half adder adds two bits; a full adder adds three bits (two operands and a carry-in). Chaining full adders yields a ripple-carry adder (RCA); carry-lookahead (CLA) computes the carries in parallel to cut the delay.
Multiplexers (MUX), decoders and encoders are standard MSI combinational blocks. A MUX selects one of many data inputs using select lines. A decoder activates exactly one of 2^n outputs from an n-bit code, so its outputs are the minterms of its inputs.
Latches and flip-flops are bistable memory elements. A latch is level-sensitive: while the enable is asserted it follows the input. A flip-flop is edge-triggered: it samples on a clock edge.
A register is a bank of flip-flops sharing a clock, often with load, clear and shift controls. A counter is a register whose state sequence follows a counted order.
A synchronous sequential circuit combines combinational logic with edge-triggered flip-flops sharing a common clock. Its behaviour is a finite state machine (FSM): present state and inputs determine outputs and next state.
Fixed-point representation places an implied binary point at a fixed position in a word: integer formats put it after the LSB, fractional formats before the MSB of the fraction field. Arithmetic uses the same adders as integer two's complement, with overflow and scaling rules.
IEEE 754 binary floating-point encodes real numbers with a sign bit, a biased exponent field and a fractional significand. It is the representation GATE means by "floating point" under Digital Logic, and the one C float/double use on essentially all hosts.
Floating-point addition and multiplication operate on IEEE encodings by aligning exponents, combining significands, normalizing, and rounding. Hardware implementations (add pipelines, fused multiply-add) belong more to Computer Organization; this note stays with the arithmetic rules.