Purnima Lallan Sharma Foundation · Est. 2021
PLS FoundationPLS FOUNDATIONEducate. Empower. Care.

QUANTUM SHARMA · WORKING MODELS

Small models. Visible workings.

Tap a transistor input, explore eight bits, then step through a tiny CPU. Predict a result, change one thing and explain what happened.

Back to the Silicon Atlas →

MODEL 1 · A CONTROLLED SWITCH

Tap the input. Follow the complementary paths.

In this ideal switch model, input 0 closes the pMOS path to the supply and opens the nMOS path to ground. Input 1 does the reverse. Both transistor gates receive the same input; the output is its logical opposite.

Ideal CMOS inverter represented as controlled switches With input 0, pMOS connects the output to the model supply and nMOS disconnects ground. The output is 1. VDD = 3.3 VGND = 0 V A = 0pMOSON nMOSOFF Y = 13.3 V
An original switch representation, not a transistor cross-section. The highlighted path means connected, not a measured flow of current. The text readouts below give the same state.
pMOS path
ON · connected
nMOS path
OFF · open
Output Y · model voltage
1 · 3.3 V

A is 0: pMOS connects Y to the 3.3 V model supply; nMOS disconnects ground. Y is 1.

The 3.3 V rail is an illustrative assumption. This model uses instantaneous, ideal switches and settled 0/1 inputs. It does not calculate analog thresholds, leakage, charging current, resistance, transition behaviour or propagation delay.

Check both settled states, with or without JavaScript
ApMOSnMOSY
0ONOFF1 · 3.3 V
1OFFON0 · 0 V

Primary source: Toshiba: basic CMOS logic circuits ↗

MODEL 2 · EIGHT PLACES, 256 VALUES

Build a number. Keep the carry.

Each bit adds its place value when it is 1: 128, 64, 32, 16, 8, 4, 2, 1. Eight unsigned bits represent 0–255. Enter A and B or tap their bits; the full sum may need a ninth bit.

Use whole numbers from 0 to 255. Each bit button shows its place value above its current bit.

00001101

Active place values: 8 + 4 + 1

00000111

Active place values: 4 + 2 + 1

Full arithmetic sum
20
Full sum · 9-bit view
000010100
Lower 8 bits · decimal and binary
20 · 00010100
Carry out · ninth bit
0
Unsigned 8-bit overflow?
No · sum fits 0–255

13 + 7 = 20. The eight-bit result is 20, with carry 0.

Full sum = 256 × carry + lower-eight-bit result. Here “overflow” means the unsigned result exceeds 255; it is not a signed-overflow flag. The explorer shows arithmetic, not an electrical adder’s voltage or timing.

Worked sums you can check on paper
A + BFull sumLower 8 bitsCarry
13 + 72000010100 = 200
255 + 125600000000 = 01
128 + 12825600000000 = 01
255 + 25551011111110 = 2541

Primary source: Microsoft: the unsigned 8-bit Byte range ↗

MODEL 3 · ONE PHASE PER TAP

Watch a tiny CPU turn 7 + 5 into 12.

This fixed, illustrative machine has an accumulator (ACC), a program counter (PC), an instruction register (IR) and three data-RAM locations. Fetch copies the instruction into IR and advances PC; decode identifies its action; execute performs it. Nothing runs automatically.

  1. Fetch · get instruction
  2. Decode · identify action
  3. Execute · perform action
PC · next instruction address
0
ACC · working value
0
IR · fetched instruction
—
Next phase
Fetch

Ready. Fetch instruction 0; accumulator and RAM[2] begin at 0.

Instruction memory · invented teaching notation
PCInstructionMeaning
0LOAD RAM[0]ACC ← RAM[0]
1ADD RAM[1]ACC ← ACC + RAM[1]
2STORE RAM[2]RAM[2] ← ACC
3HALTStop this program
Data RAM · separate from the program
AddressValueRole
RAM[0]7First number
RAM[1]5Second number
RAM[2]0Saved result

This is invented instruction notation, not an implementation of an Arm, x86 or RISC-V ISA. Every tap is a logical teaching phase, not a measured clock cycle. The fixed small integers avoid a word-width limit; the model does not simulate pipelines, caches, interrupts or electrical timing.

Expected checkpoints after each Execute
Completed actionPCACCRAM[2]
Reset · before any phase000
LOAD · tap 3170
ADD · tap 62120
STORE · tap 931212
HALT · tap 1241212

Predict first: after Fetch of ADD, does ACC already contain 12? No. Fetch changes IR and PC; the arithmetic occurs later, in Execute. After HALT the step button stops; Reset restores the original values.

Primary source: Arm: instruction cycle and processor components ↗

KEEP EXPLORING · AI LANGUAGE

From numbers in a chip to words on a screen

See how text is split into tokens, how an ID selects a vector, and how a mathematical model scores possible next tokens. Change a short training example and inspect the resulting probabilities.

Try the AI Language Lab →

These models run in this browser, make no calculation requests and save no model state. Reloading starts fresh. They explain specific rules and do not validate real circuits or a physical CPU.