+ All Categories
Home > Documents > Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal...

Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal...

Date post: 11-Aug-2020
Category:
Upload: others
View: 7 times
Download: 0 times
Share this document with a friend
15
Bits and Bytes
Transcript
Page 1: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

Bits and Bytes

Page 2: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

Decimal Numbers

The easiest way to understand bits is to compare them to something you know: digits.A digit is a single place that can hold numerical values between 0 and 9.Digits are normally combined together in groups to create larger numbers.

For example, 6,357 has four digits. It is understood that in the number 6,357, the 7 is filling the "1s place," while the 5 is filling the 10s place, the 3 is filling the 100s place and the 6 is filling the 1,000s place.

Page 3: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

So you could express things this way if you wanted to be explicit: (6 * 1000) + (3 * 100) + (5 * 10) + (7 * 1) = 6000 + 300 + 50 + 7 = 6357 Another way to express it would be to use powers of 10. Assuming that we are going to represent the concept of "raised to the power of" with the "^" symbol (so "10 squared" is written as "10^2"), another way to express it is like this: (6 * 10^3) + (3 * 10^2) + (5 * 10^1) + (7 * 10^0) = 6000 + 300 + 50 + 7 = 6357

Page 4: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

What you can see from this expression is that each digit is a placeholder for the next higher power of 10, starting in the first digit with 10 raised to the power of zero.Our base-10 number system likely grew up because we have 10 fingers, but if we happened to evolve to have eight fingers instead, we would probably have a base-8 number system.

Page 5: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

Binary Number System

Computers happen to operate using the base-2 number system, also known as the binary number system (just like the base-10 number system is known as the decimal number system).Computers use binary numbers, and therefore use binary digits in place of decimal digits. The word bit is a shortening of the words "Binary digIT."

Page 6: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

Whereas decimal digits have 10 possible values ranging from 0 to 9, bits have only two possible values: 0 and 1. Therefore, a binary number is composed of only 0s and 1s, like this: 1011So dow do you figure out what the value of the binary number 1011 is? You do it in the same way we did it above for 6357, but you use a base of 2 instead of a base of 10.(1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (1 * 2^0) = 8 + 0 + 2 + 1 = 11

Page 7: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

0 = 01 = 1

2 = 103 = 11

4 = 1005 = 1016 = 1107 = 111

8 = 10009 = 1001

10 = 101011 = 101112 = 110013 = 110114 = 111015 = 1111

16 = 1000017 = 1000118 = 1001019 = 1001120 = 10100

Decimal System Binary System

Page 8: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

Bytes

Bits are rarely seen alone in computers.They are almost always bundled together into 8-bit collections, and these collections are called bytes. The 8-bit byte is something that people settled on through trial and error over the past 50 years.With 8 bits in a byte, you can represent 256 values ranging from 0 to 255, as shown here:

Page 9: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

0 = 000000001 = 000000012 = 00000010

...254 = 11111110255 = 11111111

Page 10: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

Byte Prefixes

When you start talking about lots of bytes, you get into prefixes like kilo, mega and giga, as in kilobyte, megabyte and gigabyte (also shortened to k, M and G, as in kbytes, Mbytes and Gbytes or kB, MB and GB). The following table shows the binary multipliers:

Page 11: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

Name Abbr. Size

kilo k 2^10 = 1,024

Mega M 2^20 = 1,048,576

Giga G 2^30 = 1,073,741,824

Tera T 2^40 = 1,099,511,627,776

Peta P 2^50 = 1,125,899,906,842,624

Page 12: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

You can see in the chart that kilo is about a thousand, mega is about a million, giga is about a billion, and so on. So when someone says, "This computer has a 2 gig hard drive," what he or she means is that the hard drive stores 2 gigabytes, or approximately 2 billion bytes, or exactly 2,147,483,648 bytes. How could you possibly need 2 gigabytes of space? When you consider that one CD holds 650 megabytes, you can see that just three CDs worth of data will fill the whole thing! Terabyte databases are fairly common these days, and there are probably a few petabyte databases floating around the Pentagon by now.

Page 13: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

Megahertz

A computer is a machine in which we measure time in very small increments. When the microprocessor accesses the main memory (RAM), it does it in about 60 nanoseconds (60 billionths of a second).Microprocessors can have cycle times as short as 2 nanoseconds.

Page 14: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

Fast, powerful CPUs need quick and easy access to large amounts of data in order to maximize their performance. If the CPU cannot get to the data it needs, it literally stops and waits for it. Modern CPUs running at speeds of about 1 gigahertzcan consume massive amounts of data -- potentially billions of bytes per second. The problem that computer designers face is that memory that can keep up with a 1-gigahertz CPU is extremely expensive.

Page 15: Bits and Bytesfon10.weebly.com/uploads/1/3/4/7/13472506/3_bits_bytes.pdf · Bits and Bytes. Decimal Numbers The easiest way to understand bits is to compare them to something you

The speed of a component, measured in megahertz (MHz), refers to how fast data can be transferred.For example, a 100-MHz 32-bit bus is theoretically capable of sending 4 bytes (32 bits divided by 8 = 4 bytes) of data to the CPU 100 million times per second, while a 66-MHz 16-bit bus can send 2 bytes of data 66 million times per second.


Recommended