Binary & Hex Warm Up, Lesson & Worksheet - Garfield Cs Page 3

ADVERTISEMENT

Binary & Hex Warm Up, Lesson & Worksheet:
111. A Byte (B) is the base unit of Memory; one Byte can encode one typical
character (look up ASCII & Extended tables).
1 Byte (B) = 8 Bits (b) = 2 Hex Digits (x)
8
So how many values can a Byte have? 2
= _______
For example, Binary: 0b 01000001 = Hex: 0x 41 = Decimal 65 is an “A” in ASCII (char).
Notice that the Hex & Decimal values are easier for to read and often preferred.
1000. So how many Bytes does a Java Integer use? Integer.MAX_VALUE is
31
31
- 1) and Integer.MIN_VALUE is -2147483648 (-2
2147483647 (2
). Including 0,
32
this represents 4294967296 values, which is 2
or 32 bits = 4 bytes. Makes sense?
Here’s the other primitives in Java:
double – 8 bytes
char – 1 byte
boolean – 1 byte
+ How many bytes do you think an Object or ArrayList would take?
(hint: Point@9e8c34)
[Bonus: somewhat archaic notations used in older devices and mentioned occasionally
Nibble (or nybble) is half a Byte, only 4 bits – basically one Hex digit
Octal: Some older systems have used base 8, Octal, that uses numbers 0 – 7 only, so
3 binary bits represents each number. But let’s get back to Bytes…]
1001. Today’s Memory Devices: are typically measured in Gigabytes (GB). But this
measurement can have two different values depending if it is referring to base 10 or
Base 2 values...
9
3
Base 10: 1 GB = 1,000,000,000 bytes (10
bytes or 1000
bytes) or 256,000,000,000
bits. This is typically used for storage media, especially disk drives.
30
3
Base 2: 1 GB 1,073,741,824 bytes (2
bytes or 1024
bytes) or 274,877,906,944 bits.
This is typically used for the measurement of computer memory, usually RAM.
Here is a chart of other typical Memory measurements, in both Bases:
Name
Decimal (base10)
Binary (base 2)
3
10
Kilobyte (KB)
10
= 1000 bytes
2
= 1024 bytes
6
2
20
2
Megabyte (MB) 10
= 1000
= 1,000,000 bytes
2
= 1024
= 1,048,576 bytes
9
3
30
3
Gigabyte (GB)
10
= 1000
= 1,000,000,000 bytes
2
= 1024
= 1,073,741,824 bytes
12
4
40
4
Terabyte (TB)
10
= 1000
= 1,000,000,000,000 bytes 2
= 1024
= 1,099,511,627,776 bytes
15
5
50
5
Petabyte (PB)
10
= 1000
bytes
2
= 1024
bytes
1010. How much can these store?
(approximations depend on compression & format)
1 Kilobyte (KB): about half a page of text unformatted, a short email
1 Megabyte (MB): about 1 minute of CD quality MP3 Music
1 Gigabyte (GB): about 17 hours of Music or 40 minutes of good compressed HD video
1 Terabyte (TB): about 17,000 hours of Music (708 days) or 600 hours of video (25
days), depending on the compression used and quality of image.
Garfield Computer Science, March 2014 Mr. Bergquist
Lesson for a Day without computers

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 4