Binary workshop
About this app
Place values you can touch: flip bits and watch the decimal, hex and octal values emerge — including the remainder algorithm. In complement mode the MSB visibly weighs negative (−128 + 8 + 2 = −118); in addition mode the carries travel like in column addition — including overflow when the carry out of the MSB is lost.
Place values in binary
In binary each position is worth twice its right neighbour: 1, 2, 4, 8, 16 and so on. A number is the sum of the place values whose bit is set. Hexadecimal groups four bits into one digit, octal groups three. In the other direction the remainder method finds the binary form: divide by 2 repeatedly and read the remainders from bottom to top. In two's complement the most significant bit (MSB) carries a negative weight, −128 with 8 bits.
What the app shows
The app has three modes. In place-value mode the sum formula and the decimal, hex and octal values sit under the bit tiles, and a second card works through the remainder method. In complement mode the MSB visibly counts negative (for example −128 + 8 + 2 = −118), negation is shown as invert plus 1, with the check x + (−x). In addition mode the carries move along as in written addition, and a badge reports overflow.
Try it yourself
Click single bits or type a decimal number, switch between 4 and 8 bits, reset to zero or roll random values. Add 200 + 100 with 8 bits and see the carry out of the MSB get lost, leaving 44. In complement mode, try the MSB on its own: with 8 bits 10000000 is −128, the smallest representable number. Then flip the remaining bits one by one and watch the value climb towards −1.
Frequently asked questions
- How do you convert a binary number to decimal?
- Add the place values of all set bits. From right to left the positions are worth 1, 2, 4, 8, 16, 32, 64, 128. Example: 10010110 = 128 + 16 + 4 + 2 = 150.
- What is the remainder method for binary conversion?
- To convert a decimal number to binary, divide it by 2 repeatedly using integer division and write down each remainder. Reading the remainders from bottom to top gives the binary form. Example: 13 → remainders 1, 0, 1, 1 → 1101.
- What is overflow in binary addition?
- When the result no longer fits into the fixed number of bits, the carry out of the highest bit is lost. With 8 bits, 200 + 100 therefore gives 44, because 300 − 256 = 44.
- What can I try in the binary workshop?
- Set bits by clicking and see decimal, hex and octal live, follow the remainder method, form negative numbers in complement mode and watch carries and overflow in addition mode, each with 4 or 8 bits.
Subject: Computer science
More from Computer science
- Ackermann function
- Elevator simulator
- Binary versus linear search
- The Collatz problem
- Inside a CPU
- Swap the inside
- One frame in 16 milliseconds — how a game engine renders an image (3D)
- Function rooms in 3D
A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps