Bebe
yuzu computer maths
Tutorial toolkit · base · registers · memory
🌐 EN

Language

Any base → any base

Base Converter T1 Q1–Q6

Convert whole numbers (and decimals) between binary, octal, decimal, hex, or any base 2–36. Shows full working — positional weights going in, division-remainder going out.

Bebe
Yuzu's tip: for hex↔binary or hex↔octal, the fastest manual method is grouping bits in 4s (hex) or 3s (octal) — that's exactly how Question 5 and 6 in Tutorial 1 expect you to work, and how the converter explains its steps too.
💡 Did you know?

We count in base-10 because we have 10 fingers — historical accident, not math. Computers count in base-2 because a transistor only has two reliable states: on or off. There's no stable "half-on" to build a third digit from, so binary isn't a design choice — it's the only option physics gives you.

Arithmetic in a given base

Base Arithmetic T1 Q8–Q11

Add, subtract, multiply, or divide two numbers written directly in binary, octal, or hex — no need to convert to decimal first.

💡 Did you know?

Doing arithmetic in binary or hex isn't a different kind of math — it's the same math in a language you're less fluent in. The sheep don't change when you count them in French instead of English; only the words do. Carrying in base-16 works exactly like carrying in base-10, except you roll over after F instead of after 9.

Signed binary

Unsigned / Signed Reader T2 Q1

Enter an 8-bit (or wider) binary pattern and read it both ways.

Two's Complement Subtraction T2 Q2–Q3

Computes A − B as A + (two's complement of B), shows carry/overflow detection, and verifies the signed decimal result.

💡 Did you know?

Why two's complement instead of just a sign bit? Because it lets the CPU use the exact same adder circuit for both addition and subtraction. The processor never needs to know it's subtracting — "A minus B" simply becomes "A plus negative-B," and the same hardware handles both. One circuit, half the complexity.

Fixed-point & floating-point

Decimal ⇄ Any-base Float T2 Q4

Convert numbers with a fractional part (e.g. 12.34) between decimal and another base.

SEEMMMMM Encoder / Decoder T2 Q5–Q6

A custom 8-digit floating format: 1 sign digit + 2 exponent digits (excess-N) + 5 mantissa digits, implied point at the start of the mantissa. Set the excess bias and sign digits to match your tutorial's convention.

SEEMMMMM Add / Multiply T2 Q6

Adds or multiplies two 8-digit SEEMMMMM numbers (aligning exponents for addition), returning standard sign-and-magnitude decimal.

IEEE 754 Single Precision T2 Q7–Q8

Encode a decimal value into IEEE 754 single precision (1+8+23 bits), or decode a 32-bit pattern back to decimal — sign, exponent (excess-127), and mantissa shown separately.

💡 Did you know?

0.1 looks perfectly clean in decimal, but in binary it's an infinitely repeating fraction — the same way 1/3 never finishes in decimal (0.3333...). Since floats only store a fixed number of bits, that infinite tail gets cut off and rounded. That's the real reason 0.1 + 0.2 doesn't always equal exactly 0.3 in code — not a bug, just a translation problem between two number systems.

Memory & x86 addressing

Endianness Visualizer T5 Q1

Shows how a multi-byte hex value is laid out in a register vs. in memory, for both little-endian and big-endian order.

x86 Physical Address Calculator T5 Q2

Real-mode segment:offset → physical address, using Physical = Segment × 16 + Offset.

Bebe
Quick reference: next instruction = CS:IP  ·  data at DS:SI or DS:DI  ·  top of stack = SS:SP. Run each pair through the calculator above.

Memory Alignment Layout T7 Q3

Lay out BYTE/WORD/DWORD variables in memory, with optional ALIGN directives, starting from a given address.

RGB Image Memory Table T2 Q9

Lays out a 2×2 RGB image (3 bytes/pixel) in memory starting from a given address.

💡 Did you know?

"Endian" comes from Gulliver's Travels — Jonathan Swift's Lilliputians went to war over whether a boiled egg should be cracked from the big end or the little end. Computer scientist Danny Cohen borrowed the joke in 1980 to describe the exact same kind of pointless-seeming dispute: should the biggest byte of a number go first in memory, or last? Both sides work fine — they just have to agree.

Register simulation

EAT Calculator T4 Q6 · Extra Q1

Effective Access Time = (Hit Ratio × Hit Time) + (Miss Ratio × Miss Time).

MOV / DIV / MUL / SHL / SHR Simulator T6 Q4 · T7 Q1

Type a short sequence of 8086 instructions (one per line). Supports MOV, ADD, SUB, INC, DEC, NEG, MUL, DIV, SHL, SHR on AX/AH/AL/BX/BH/BL/CX/CL/DX. Watches AX, BX, CX, DX after each line.

💡 Did you know?

AX, BX, CX, and DX aren't random letters — they're shorthand for Accumulator, Base, Counter, and Data. On the earliest processors these weren't just naming conventions, they were physically separate circuits each wired for one specialized job. Modern CPUs fake this with general-purpose hardware, but the old names stuck around as a fossil of how computers used to actually be built.

Bitwise ops & loop tracing

Boolean Register Operations T8 Q1

Run AND / OR / XOR / NOT / TEST on hex register values, with the bit-by-bit working shown.

LOOP / JMP Iteration Tracer T8 Q2

Pick a pattern matching your snippet — the tracer plays out exactly what CX does each pass.

💡 Did you know?

A "loop" instruction never asks "should I keep going?" before acting — it always does the work first, then checks the counter afterward, the same way you take a bite before checking if you're still hungry. That's exactly why a loop that starts with cx already at 0 doesn't skip the body — it runs once, decrements into underflow, and only then discovers something's wrong.

Quick-reference notes
💡 Did you know?

The word "bug" for a technical fault predates computers by decades — Thomas Edison was already using it in his notebooks in the 1870s. But the legend got a literal exclamation point in 1947, when Harvard's Mark II relay computer jammed because an actual moth was wedged inside Relay 70. Someone taped it into the logbook with the note "first actual case of bug being found" — and Grace Hopper told that story so well, for so many years, that the moth became the mascot for every error since.