17
BITS, BYTES, AND BINARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

Embed Size (px)

Citation preview

Page 1: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

BITS, BYTES, AND BINARYThe down-low on what’s going on with all those 1’s and 0’s inside a computer

Page 2: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

YOUR STANDARD NUMERICAL SYSTEM

In order to understand what binary is, you’ll have to understand first, what it is not. It uses a different base to count than what you’re used to.

Page 3: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

WHAT YOU KNOW

What you know, in traditional math and counting, is called the decimal system, or base-10

Decimal: relating to or denoting a system of numbers and arithmetic based on the number ten, tenth parts, and powers of ten. (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) 100 = 1, 101 = 10, 102 = 100, 103 = 1,000, 104 =

10,000

Tens

174

OnesHundreds

Page 4: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

WHAT BINARY IS INSTEAD

Binary is a language that is base-2, by contrast.

The only two numbers in Binary are 0 and 1, instead of 0-9 in base-10/decimal.

20 = 1, 21 = 2, 22 = 4, 23 = 8, 24 = 16, etc. Counting like this seems inefficient for a person, but

it makes the most sense for computers. Computers interpret electricity, as you may remember, as 1 for on, and 0 for off. 2 states of electricity to interpret as data.

If you wanted to give a simple computer the number 174 from the last page, it looks harder to make but it actually isn’t terrible once you understand it.

Page 5: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

Tens

174

OnesHundreds

128 64 32 16 8 4 2 1

0 1111 10 0

BASE-10 (DECIMAL)

BASE-2 (BINARY)

174=

27 26 25 24 23 22 21 20

102 101 100

Page 6: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

BINARY IS AS BINARY DOES

Binary, being only base 2, takes that string of numbers and, recognizing it as a single unit (10101110) adds up the places that they represent.

128+0+32+0+8+4+2+0 = 174

This is how a computer turns electricity into data, and that data becomes everything you do on a computer.

Page 7: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

BITS

To a computer, using binary, any of those individual numerical places are called bits.

A bit is a single value of 0 or 1. A bit is represented by a lowercase “b” Apparently even the nerdiest of computer

nerds thought that its full name, binary digit, was too long to say. So in the interest of efficiency, they smooshed the two words together (doing that is called a portmanteau in case you’re interested) into the word bit.

Page 8: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

YOU EVER HEAR PEOPLE TALK ABOUT BITS?

I’ve been hearing the term bit my whole life, but I’m interested to hear how many times it makes its way into your ears.

Page 9: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

FUN FACTS ABOUT BITS

Growing up in the 80s, I remember grown-ups talking about how the Nintendo Entertainment System was 8-bit, but the Super-Nintendo system was 16-bit.

This refers to the power of the processor to count numbers and process colors. An 8-bit system could only handle binary values of 8 bits, or 8 places in the decimal system, just like our number 174 in the previous examples.

Page 10: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

FUN FACTS ABOUT BITS

They creatively worked around that limitation for high scores and point values for stomping on goombas and what have you, but if you’re familiar with the NES then you’ll note that often the maximum amount of something you could have was usually 255.

255 is the maximum number you can have in an 8 bit system, represented by the addition of 128+64+32+16+8+4+2+1 = 255

That also mean that it could only use 255 colors, effectively called 8-bit color.

Page 11: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

WHEN YOU STEP UP…

When you move to 16-bit, though, the processor becomes beefier, can handle larger numbers and more colors.

With 16 bits, a computer can count to 65,535 as a result.

For all of our advances in the years since the NES, the XBoxOne and PS4 are only using 64-bit processors, although the technology allows them to act like 8 smaller processors in one. And 64-bit processors are extremely powerful. Put 263 in your phone to see the size of that number.

Page 12: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

FINALLY…

When you see Comcast and AT&T commercials on TV bragging about their internet speed in megabits…

What does that mean? How do megabits affect my download speed?

We get to talk about that now, because it fits right into the next section, bytes.

Page 13: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

ALL RIGHT, BUCK, THIS BYTES

Bytes are a unit of data measurement comprised of 8 bits.

Bytes are represented with a capital “B”.

As computers were growing and developing back in the day, it took 8 bits to tell a computer how to encode binary as a letter to show on your screen.

An encoding method for Binary popped up pretty quickly, called ASCII, which would be able to convert Binary to text by looking up the conversion in a table. There were 128 conversions in the original ASCII, which corresponds to the 8 places in binary – 128 is the 8th position.

Page 14: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

BYTE ME

As computers grow in size and scope, their ability to process large amounts of data grow as well. What started out as a very simple terminal-style computer with an 8-bit processor and an ASCII table has grown into a computer that has a 64-bit processor, and terabytes of data storage.

Bytes are counted on the metric system.

The metric system is something that you’ve probably only had to deal with in science class, but it applies here as well.

Page 15: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

OH, METRIC, THIS SHOULD BE EASY

Kilobyte = 1,000 bytes Megabyte = 1,000,000 bytes Gigabyte = 1,000,000,000 bytes Terabyte = 1,000,000,000,000 bytes Petabyte = 1,000,000,000,000,000 bytes

Try not to think too hard about the fact that we’re counting base-2 units in 8-unit bundles which are counted in base-10 denominations.

Page 16: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

REVIEW EXERCISE

My internet service constantly boasts that my download speed is 22 megabits/second.

What is my download speed in megabytes?

How many floppy disks of information can be stored on a 2GB flash drive, if each floppy disk holds 1.4MB?

Page 17: B ITS, B YTES, AND B INARY The down-low on what’s going on with all those 1’s and 0’s inside a computer

WORKSHEET

Uh oh!

Quiz time!