LED8

Inputs

PinTypeDescription
DataInbus8Input byte — each bit controls one LED

Outputs

PinTypeDescription

This element has no outputs.

How It Works

LED8 is a string of eight fairy lights with a whole byte plugged into it. Each lamp is responsible for one bit of the bus: a one lights its LED green, a zero leaves it dark. Connect DataIn to any 8-bit bus — and the byte's contents turn into a glowing pattern that refreshes on every simulation step.

The key property: the bus value can be read straight from the lights. Bit 0 (the LSB) is the leftmost LED, bit 7 (the MSB) is the rightmost. For example, 00001111 (15) lights the four leftmost lamps — bits 0–3, while 10000001 (129) lights only the two outermost. A quick eye test: as many ones in the byte as there are lit lamps, and their positions show which bits are set.

A nuance: LED8 is fully passive. It has no outputs, draws no signals and never affects propagation — you can hang as many of these indicators anywhere in the circuit as you like. And remember: LED8 shows bits, not a number — to see the value as a number, you need a Display.

Value Examples

DataIn (bin)DataIn (dec)What you see on the bar
000000000All LEDs dark
0000111115Four leftmost lit (bits 0–3)
10101010170Every other one lit: bits 7, 5, 3, 1
10000001129Two outermost lit: bits 0 and 7
11111111255All eight lit

Read the table from right to left, like an ordinary binary number: the rightmost LED is the most significant bit, and the bar mirrors the byte.

Usage

LED8 is the go-to visual debugging tool. On level 12 it is placed on the Register8 output to show what the register currently holds. On level 15 the decoder's control signals — ALUOp0, ALUOp1, RegLoad — are gathered through a Maker and watched on the bar in real time. On level 27 the bar displays data flowing through the I/O ports, and in the sandbox it is simply always at hand.

A concrete scenario: the OUT instruction writes a byte to the LED port — and the lit LEDs show the binary representation of the number. This makes program debugging easy: instead of computing the value in your head, you instantly see which byte left for the port and spot a failure by the "wrong" light pattern.

Build it yourself →

Related components

Related articles

Frequently Asked Questions

How do you output a number to LED8?

Write a byte to the LED port with an OUT instruction: the lit LEDs show the binary representation.

What is the bit order on the bar?

Bit 0 (the LSB) is the leftmost LED, bit 7 (the MSB) is the rightmost: the bar mirrors the bit order of the bus.

Does LED8 affect the circuit?

No, it is a purely visual element without outputs: it never slows the simulation or touches the signals, so you can place as many indicators as you want.