Operations Catalog

Select bitwise operations or CS2100 teaching presets.

CS2100 Teaching Recipes & Presets
&AND (Bitwise Mask)

Yields 1 only where both operands have 1.

|OR (Bitwise Set)

Yields 1 where either operand has 1.

^XOR (Bitwise Toggle)

Yields 1 where bits differ (toggles masked bits).

~NOT (One’s Complement)

Inverts every bit across the word width.

<<SLL (Logical Left Shift)

Shifts bits left by k, discards MSBs, fills zeros on right.

>>SRL (Logical Right Shift)

Shifts bits right by k, discards LSBs, zero-fills on left.

>>>SRA (Arithmetic Right Shift)

Shifts bits right by k, preserves and sign-extends MSB on left.

<<<ROL (Circular Rotate Left)

Rotates bits left: MSBs wrap around to LSBs.

>>>ROR (Circular Rotate Right)

Rotates bits right: LSBs wrap around to MSBs.

+ADD (Modulo 2^W)

Binary addition masked to the word size.

-SUB (Modulo 2^W)

Binary subtraction masked to the word size.

Recipe Pipeline

Sequential operations (1) executed left-to-right.

Step 1: AND (Bitwise Mask)&
Accumulator: 0000 11000x0C
Signed: 12Unsigned: 12

Initial Value

Initial accumulator bit pattern and word size.

0xAC · Signed: -84
Initial bits: 1010 1100Unsigned: 172

Pipeline Output

Bit visualizer, representations, and step workings.

0000 1100
UNSIGNED DECIMAL12
SIGNED (2’S COMPLEMENT)12
HEXADECIMAL0x0C
WORD SIZE8 BITS
Per-Bit Inspector (MSB 7 down to LSB 0):Click initial bit to toggle
Bit 7 is MSB (Sign bit in two’s-complement: 0 (positive))Bit 0 is LSB

All bitwise calculations execute over 8-bit registers. Signed representations use two’s complement without changing underlying bits. Shift and rotate operations explicitly track discarded and filled bits.