Programming Concepts Tutorial

Learn the fundamental concepts of computer programming

Bits and Bytes

Bits and Bytes

At the deepest hardware level, computers only understand two states: Electricity ON or Electricity OFF. We represent these states as 1 and 0.

  • Bit: The smallest unit of data in a computer. It is a single 0 or 1 (Binary Digit).
  • Byte: A group of 8 bits. A single byte can represent 256 different values (from 00000000 to 11111111).

Everything on your computer—text, images, videos, games—is eventually broken down into billions of bits!

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics