Learning Binary Numbers

Explore the fascinating world of binary numbers, logic gates, and digital circuits through interactive demonstrations and tools.

Understanding Binary Numbers

Binary is a base-2 number system that uses only two digits: 0 and 1. Each digit in a binary number is called a "bit". In computing, binary numbers are fundamental as they represent the on (1) and off (0) states of transistors in computer chips.

Binary Place Values

Just like decimal numbers have place values (ones, tens, hundreds, etc.), binary numbers have place values that are powers of two:

Bit 5
0
Bit 4
0
Bit 3
0
Bit 2
0
Bit 1
0
Bit 0
0
Decimal Value: 0

Click on the binary digits above to toggle between 0 and 1. Watch how the decimal value changes in real-time!

How Binary Works

To convert binary to decimal, multiply each bit by its place value (power of two) and add up the results. For example:

1011 in binary = (1×8) + (0×4) + (1×2) + (1×1) = 11 in decimal

Logic Gates in Digital Circuits

Logic gates are the building blocks of digital circuits. They perform logical operations on binary inputs and produce a single binary output. These gates are implemented using transistors and form the basis of all digital electronics.

AND Gate

Outputs 1 only if all inputs are 1. Think of it like a strict requirement where all conditions must be met.

AND
A B Output
0 0 0
0 1 0
1 0 0
1 1 1

OR Gate

Outputs 1 if any input is 1. This is like an inclusive option where any condition being true is enough.

OR
A B Output
0 0 0
0 1 1
1 0 1
1 1 1

NOT Gate

Outputs the opposite of the input (inverter). This is the simplest gate with just one input and output.

NOT
Input Output
0 1
1 0

Interactive Gate Demonstrations

These interactive demonstrations show how different logic gates control physical devices like light bulbs. Toggle the switches to see the logic gates in action!

AND Gate Demonstration

The bulb will only light up when both switches are turned on, demonstrating AND gate logic. This represents scenarios where multiple conditions must be true simultaneously.

OR Gate Demonstration

The bulb will light up when either switch is turned on, demonstrating OR gate logic. This represents scenarios where any one condition being true is sufficient.

Binary-Decimal Converter

Use this interactive converter to translate between binary and decimal numbers (up to 6-bit numbers, 0-63). The converter provides instant results as you type.

Result: