1 · Learn01 / 19
Loading Zig engine
Module 01
Bits and switches
2 · Check your understanding
3 · Use the lab
Test your prediction
Each switch shows its bit value and its place weight.
Binary00101010
Decimal42
Hex2A
Fixed-width arithmetic
Watch values wrap
Truncated unsigned255
Signed interpretation-1
Byte-addressed memory
Inspect four bytes
Edit a two-digit hex byte. The bits below it update as you type.
Little-endian
Big-endian
UTF-8 text
Logic and storage
AND · carry0
OR0
XOR · sum0
Stored bit0
When writing is off, the stored bit keeps its previous value.
Bytecamp teaching CPU
ReadyStep through instructions
The highlighted row is next. Each row shows its address, assembly instruction, and encoded bytes in hex.
Program
Registers used by this program
Check what you observed
Binary and hex calculator
Use 0b for binary, 0x for hex, or digits alone for decimal. Try 0b11 and 0x03.
Arithmetic and storage width
Decimal
Hexadecimal
Binary (grouped)
One hex digit matches four bits. The readouts show the same value three ways.
Show bytes in memory
| Address | Big-endian | Little-endian |
|---|