Binary Numbers

Introduction

Ever since its introduction in the 17th century, binary numbers have become the foundation for all modern computing. Process which would normally take the human brain an extremely long time to complete can be done by CPU's (Central Processing Unit), at speeds of thousands of times faster than the human brain. Computers have come to replace humans with tasks such as mathematics and cryptography, among others. By using binary numbers, computers are able to represent data in simply 2 states, on and off, or 1 and 0. These binary digits, or bits can be combined to form bytes, which can then be combined to form kilobytes, megabytes, gigabytes, and even terabytes. Large numbers of bytes can store large amounts of information and processes.

Materials

A few simple electronic components and a computer are needed to build the binary counter.

These include:

  • Solderless breadboard

  • 8 LED's of the same color

  • 8 330 ohm resistors

  • Several jumper wires

  • Arduino UNO microcontroller

  • Windows 7 or later, Mac OS X, or Linux

In addition, the Arduino IDE is necessary to program the microcontroller.

Procedures

  1. First, familiarize yourself with the Arduino IDE. You should feel comfortable with programming in C and wiring simple circuits to the Arduino.

  2. Connect eight, 330 ohm resistors to the breadboard's GND (Ground) rail.

  3. Use wires to connect each resistor should be connected to the negative lead of the LED's. Remember that the longer lead is positive, and the shorter one is negative.

  4. Connect a wire from the Arduino's GND port to the breadboard's GND rail. Now the circuit is grounded.

  5. Use wires to connect each of the Arduino's IO pins to the positive lead of the LED's. Now the circuit has power.

  6. On your computer, open the Arduino IDE and write the code for the program. If you need help, here is my code:

  1. Finally, connect your Arduino to your computer and run the program. If your code works correctly, the LED's should represent binary numbers.

Scientific Principles

This project involves a combination of basic electronics, programming, and mathematics to build a binary counter which can be used as a visual representation of binary numbers and how to count in binary.

Knowledge of how binary numbers, which are base 2, can be converted into decimal form, which is base 10, was necessary to count in binary. In addition, addition, subtraction, multiplication, and division of binary numbers along with bitwise operations such as AND (&), OR (|), XOR (^), and NOT (!) were helpful in understanding how binary numbers are used and manipulated by the CPU.

Also, the PBL project revolved around the Scientific Method. Firstly, the question of how binary numbers could be better represented was developed. Then, after much brainstorming, the idea of using a binary counter with LED's to display binary numbers was chosen. Research on basic electronics and programming was done. Afterwards, a binary counter was built and tested multiple times.