silicon atlasTHE HARDWARE REFERENCE
العربية
Reference/First principles
Foundations

Bits, integers & floating point

The same bits can represent a number, an instruction, or a color.

The hardware sees a bit pattern. The operation decides what it means.
Bit pattern

Raw representation.

LIVE EXPERIMENT

Build a decision

Runs on your device
Tap each input to flip it.
A
B
XORA ≠ B
1OUTPUT
Truth table
ABXOR
000
011
101
110

NAND can build any Boolean function. Combining small gates creates selectors, adders, and control.

What this model includes

Ideal Boolean logic. Electrical timing and noise are omitted.

FOLLOW THE MECHANISM

What happens inside

1

Choose an interpretation

An unsigned n-bit integer spans 0 through 2ⁿ−1. Two’s complement reuses those bit patterns for signed arithmetic. The high bit has negative weight. Addition wraps modulo 2ⁿ at the bit level, but language rules can treat signed overflow differently. Endianness orders bytes in memory, not the numerical significance of a register.

2

Approximate real numbers

Floating point separates sign, exponent, and significand. Finite precision requires rounding. Many decimal fractions, including 0.1, have no exact finite binary representation. Addition is not associative after rounding; NaN, infinity, subnormals, and signed zero have special rules. FP32 and FP64 trade storage and throughput for precision and range.

PUT IT TO WORK

What this means for your code

Low-level engineer

Understand carry versus overflow flags, rounding modes, alignment, and ABI data sizes. FP exceptions and fast-math assumptions change semantics.

Software developer

Use integer or decimal types for exact monetary rules. Reordering a numerical reduction can change its result even if the mathematics looks identical.

A concrete exampleRead-only example
// JavaScript uses binary64 numbers
console.log(0.1 + 0.2 === 0.3); // false
console.log((255 + 1) & 255);  // 0 (8-bit wrap)
GO TO THE SOURCE

Read the actual specifications

These references supply the underlying contracts and implementation details. The diagrams here are simplified teaching models.

Oracle · Floating-point arithmeticOracle
RISC-V · ISA specificationsRISC-V International

Keep following the connection

Understood the idea? Keep a note of your progress.