Room 514

Classes, curriculum, education…

Binary Numbers 1.0 February 4, 2008

Filed under: ICE3M — mryantho @ 9:04 pm

Here is some introductory material on binary, or Binary 1.0.

What is Binary?

Binary numbers are the preferred language of computers. I say “language” because computers use binary numbers to represent everything; numbers, letters, words, colours. It’s all binary. There really isn’t any magic behind why computers use binary; they do because they are machines . And more precisely they are machines that use electricity.

Inside the computer at the most basic levels, a computer needs to store or hold onto data in some way. At the most basic level, the computer does this by either having electricity or not having electricity. It is like either having a light-bulb on, or a light-bulb off. In fact, often in the world of computers we interchange the words “one” and “on” with “zero” and “off.” Technically, it usually is not on or off but rather low voltage or high voltage.

You can think of these as equivalent to 0:

And likewise these equivalent to 1:

So far I have only really talked about what a binary number is and why we use them, we have so much more to look at. We really need to understand how to use them, because if we don’t understand how to use them, then what good are they?

Using Binary Numbers (or Making Binary Numbers Bend to our Will)

It is important to understand that binary is a number system just like the decimal number system. And of course the decimal number system is the number system we use every day, you know, the one with 10 digits (0-9.) The name decimal comes from “deca” which means ten, just like binary comes from “bi” which means two. So, decimal numbers (ten digits), binary (two digits).

Of course that doesn’t address place values. I’m referring to how in a decimal number like 134, the 1 is in the hundreds column, the 3 is in the tens column, and the 4 is in the ones column.

This means that 134 is really (1 x 100) + (3 x 10) + (4 x 1). I know you’ll find it fascinating then that each column (ones, tens, hundreds) goes up by a power of 10! Well, maybe not fascinated but hopefully mildly interested. So the ones column is actually 10 to the power of 0, or 1. And the tens column is 10 to the power of 1, or 10, and the hundreds column is 10 to the power of 2, or 100.

10^0 =1, 10^1 = 10, 10^2 = 100, 10^3 = 1000

Here is a good explanation of binary numbers: http://www.lyzrdstomp.com/binary/binprime.html Remember, the numbers are the same, it’s really only how we write or express them that changes.

Additional Resources

 

Binary Arithmetic

Filed under: ICE4M — mryantho @ 7:04 pm

Introduction

In grade 11 you had learned the basics of the binary number system including:

  • Converting to and from base 10 numbers
  • Converting to and from hexadecimal
  • Binary Addition

But we will need to learn some other binary arithmetic in grade 12 in order to understand how data is stored and processed in a computer. But first, here’s some refresher material on concepts from grade 11.

Converting Binary (http://www.computerhope.com/binhex.htm)

Binary Addition (http://www.allaboutcircuits.com/vol_4/chpt_2/2.html)

Binary Game (http://forums.cisco.com/CertCom/game/binary_game_page.htm)

Binary Subtraction

Binary subtraction is similar to subtraction in base 10. It is similar in the sense that if we cannot complete the subtraction, we can borrow from the next column over. Download and read the Binary Subtraction note.

Visit this site for an animated example on binary subtraction:

(http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/Subtraction/index.html)

Binary Multiplication

Multiplying binary numbers is easier than multiplying base 10 numbers. This is because technically you don’t even need to multiply anything. See the full example: http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/Multiplication/index.html.

We can see that multiplying is just a series of shifts and additions. In fact, at a basic level this is how multiplication is accomplished with basic hardware.

HOMEWORK

This worksheet is due tomorrow.