A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Binary Arithmetic

College Depth 79 in the knowledge graph ☐ I know this ☆ Set as goal
286topics build on this
332prerequisites beneath it
See this on the map →
Binary Number SystemBinary Counters: Design and Analysis→→Binary Adders: Half-Adders and Full-AddersFixed-Point Number Representation+4 more
binary arithmetic overflow addition

Core Idea

Binary arithmetic follows the same rules as decimal arithmetic but with carries occurring at 2 rather than 10. Adding two 1-bits produces a sum of 0 and a carry of 1 into the next position. Overflow occurs when the result of an operation exceeds the number of bits available to represent it. Binary subtraction can be performed using addition with negated operands, which motivates the two's complement representation used in hardware.

How It's Best Learned

Work through 4-bit and 8-bit addition problems by hand, tracking carries carefully. Intentionally create overflow scenarios to understand when results wrap around. Compare binary addition to decimal to reinforce structural similarity.

Common Misconceptions

Explainer

If you can add in decimal, you can add in binary — the rules are structurally identical, just simpler. In decimal, each digit ranges from 0 to 9, and you carry to the next column when a sum reaches 10. In binary, each digit (called a bit) is either 0 or 1, and you carry when a sum reaches 2. The complete addition table for one bit position has only four entries: 0+0=0, 0+1=1, 1+0=1, and 1+1=10 (that is, 0 with a carry of 1). This simplicity is exactly why computers use binary — the addition rules map directly onto simple logic gates.

To add multi-bit numbers, you work column by column from right to left, just as in decimal long addition. Consider adding 0110 (6) and 0011 (3) in four bits. The rightmost column: 0+1=1, no carry. Next: 1+1=10, write 0 and carry 1. Next: 1+0 plus the carry 1 = 10, write 0 and carry 1. Leftmost: 0+0 plus the carry 1 = 1. Result: 1001 (9). The carry chain — the sequence of carries rippling from right to left — is the critical path in binary addition, and it directly determines how fast hardware adders can operate.

Overflow occurs when the result of an arithmetic operation cannot be represented in the available number of bits. In unsigned 4-bit arithmetic, the largest representable value is 1111 (15). Adding 1000 (8) and 1001 (9) gives 10001 (17), but only four bits are stored, so the result wraps to 0001 (1) and the carry-out is lost. The hardware does not raise an error — it simply discards the extra bit. Detecting overflow is the programmer's responsibility, typically by checking a carry flag or an overflow flag set by the processor.

Binary subtraction works by the same columnar method, borrowing instead of carrying. But hardware designers prefer to avoid building separate subtraction circuits. Instead, subtraction is performed as addition with a negated operand: to compute A - B, you negate B and add. This insight motivates two's complement representation, which you will study next. In two's complement, negation is a simple bit manipulation (invert all bits and add 1), so the same adder circuit handles both addition and subtraction — an elegant unification that keeps hardware simple and fast.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Binary Counters: Design and Analysis → Binary Arithmetic

Longest path: 80 steps · 332 total prerequisite topics

Prerequisites (2)

Leads To (6)