> For the complete documentation index, see [llms.txt](https://cs.brash.ca/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cs.brash.ca/unit-1/binary-and-logic/bits-and-bytes-binary.md).

# Bits and Bytes (Binary)

A bicycle has two wheels, a binomial has two... nomials, and we (humans) are bipedal - we have two feet! Electricity *has two states* - on (1) and off (0). This means we need a number system that allows us to count using only two digits.

{% tabs %}
{% tab title="Decimal vs. Binary" %}

### Decimal vs. Binary

Our decimal number system has ten 'digits', just like our fingers - which we also call digits (similar to 'digital' - no?). Our placeholders can have any of the digits 0 1 2 3 4 5 6 7 8 9. Once over 9, we increase the next placeholder by one and roll the 9 to 0.

![](/files/-LKmSp0bT1KDLoDDLIqh)

Since electricity can either be **on (|)** or **off (O)**, ether **flowing (1)** or **not flowing (0)**, we are unable to use the decimal system to represent numbers - ***we only have two states, not ten!***
{% endtab %}

{% tab title="Useful Media" %}

{% embed url="<https://www.youtube.com/watch?v=Xpk67YzOn5w>" %}
Why Do Computers Use 1s and 0s? Binary and Transistors Explained.
{% endembed %}

{% embed url="<https://youtu.be/ewokFOSxabs>" %}
How Computers Work - Binary and Data
{% endembed %}

{% embed url="<https://youtu.be/Sc3lh3D4rCw>" %}
How Computers Work - Circuits & Logic
{% endembed %}

**Other great videos:**\
&#x20; \- [Binary Numbers and Base Systems | As Fast as Possible](https://youtu.be/LpuPe81bc2w)\
&#x20; \- [Binary Tutorial](https://youtu.be/0qjEkh3P9RE) - written samples

{% embed url="<https://www.logic-puzzles.org/init.php>" %}
{% endtab %}
{% endtabs %}
