Understanding Computer Memory - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Understanding Computer Memory

Description:

If You have used a computer you have probably heard the ... The code above creates a shade of red called 'crimson.' The red setting, DC, is pretty intense. ... – PowerPoint PPT presentation

Number of Views:66
Avg rating:3.0/5.0
Slides: 26
Provided by: kean
Category:

less

Transcript and Presenter's Notes

Title: Understanding Computer Memory


1
Understanding Computer Memory
  • Introduction
  • Binary Numbers
  • Bits and Bytes
  • ASCII Code

2
Computer Memory
If You have used a computer you have probably
heard the words bits and bytes. You might hear an
advertisement that says, "This computer has a
32-bit Pentium processor with 64 megabytes of RAM
and 2.1 gigabytes of hard disk space. To
understand this terminology we must understand
the numbering system used by computer
manufacturers.
3
So What is a bit?
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. So you
could express things this way if you wanted to be
explicit
The reason our number system is called a
place-value system is because the position or
place of the digit tells you its value (in this
case 1, 10, 100, 1000 etc). The reason they are
mutilples of ten is because we have ten different
symbols)
4
Binary Numbers
Computers happen to operate using the base-2
number system, also known as the binary number
system. The word bit is a shortening of the words
"Binary digit." 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 1011. How do you figure out what the value
of the binary number 1011 is?
You can see that in binary numbers, each bit
holds the value of increasing powers of 2. The
reason each positions value is a multiple of two
is because there are only two symbols.
5
A Bit About Bits
Even the most sophisticated computer is really
only a large well-organized volume of
bits. David Harel
  • A bit (binary digit)
  • is the smallest unit of information
  • can have two values
  • can represent numbers, codes, or instructions
  • Think of these values as switches yes and no,
    black and white, high and low, or on

and off
6
More about Bits
  • Each switch can be used to store a tiny amount of
    information, such as
  • An answer to a yes/no question
  • A signal to turn on a light
  • Larger chunks of information are stored by
    grouping bits as units
  • 8 bits (byte) 256 different messages

7
Information
  • Information comes in many forms
  • Words . . . Numbers . . . Pictures . . . Sounds
  • Computers only understand information in digital
    form
  • Information must be broken into bits

8
We can look at any number in the binary system as
a number of Off/On switches. If the switch is
On this represents a 1, if it is Off it
represents a zero.
If all the swtches are On in a 8 digit number
then the number represented is 255 (Add
1286432168421)
Each digit is called a bit. On the right you see
the representation for the number 58. (321682)
9
Byte a grouping of eight bits of information
Using two bytes the largest number that can be
written is 65,535
10
Bits as Codes
  • ASCII - American Standard Code for Information
    Interchange
  • most widely used code, represents each character
    as a unique 8-bit code.

Every letter has a unique number associated with
it, e.g. the decimal number 65 is associated with
the letter A
11
Bits as Instructions
  • The computer stores programs as collections of
    bits.
  • For instance, 01101010 might instruct the
    computer to add two numbers.
  • Other bit instructions might include where to
    find numbers stored in memory or where to store
    them.

12
Bits, Bytes, and Buzzwords
  • Common terms might describe file size or memory
    size
  • Bit smallest unit of information
  • Byte a grouping of eight bits of information
  • K (kilobyte) about 1,000 bytes of information
    - technically 1024 bytes equals 1K of storage.

13
This is how you write numbers in binary
10 1010 11 1011 12 1100 13 1101 14
1110 15 1111 16 10000 17 10001 18
10010 19 10011 20 10100
0 0 I 1 1 II 2 10
III 3 11 IIII 4 100 IIIII 5
101 IIIIII 6 110 IIIIIII 7 111 IIIIIIII 8
1000 IIIIIIIII 9 1001
14
Bytes
Bits are rarely seen alone in computers. They
are almost always bundled together into 8-bit
collections, and these collections are called
bytes. Why are there 8 bits in a byte? A similar
question is, "Why are there 12 eggs in a dozen?"
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
0 00000000 1 00000001 2 00000010
... 254 11111110 255 11111111
15
ASCII Characters
Bytes are frequently used to hold individual
characters in a text document. In the ASCII
character set , each binary value between 0 and
127 is given a specific character. Most computers
extend the ASCII character set to use the full
range of 256 characters available in a byte. The
upper 128 characters handle special things like
accented characters from common foreign
languages. The first 32 values (0 through 31)
are codes for things like carriage return and
line feed. The space character is the 33rd value,
followed by punctuation, digits, uppercase
characters and lowercase characters.
Here are the first 127
16
101 e 102 f 103 g 104 h 105 i 106
j 107 k 108 l 109 m 110 n 111 o 112
p 113 q 114 r 115 s 116 t 117 u 118
v 119 w 120 x 121 y 122 z 123 124
125 126 127 DEL
80 P 81 Q 82 R 83 S 84 T 85 U
86 V 87 W 88 X 89 Y 90 Z 91
92 \ 93 94 95 _ 96 97 a
98 b 99 c 100 d
0 NUL 1 SOH 2 STX 3 ETX 4 EOT
5 ENQ 6 ACK 7 BEL 8 BS 9 TAB
10 LF 11 VT 12 FF 13 CR 14 SO 15
SI 16 DLE 17 DC1 18 DC2 19 DC3 20
DC4
41 ) 42 43 44 , 45 - 46 .
47 / 48 0 49 1 50 2 51 3 52 4
53 5 54 6 55 7 56 8 57 9 58
59 60 lt
61 62 gt 63 ? 64 _at_ 65 A 66 B 67
C 68 D 69 E 70 F 71 G 72 H 73
I 74 J 75 K 76 L 77 M 78 N 79 O
21 NAK 22 SYN 23 ETB 24 CAN 25 EM
26 SUB 27 ESC 28 FS 29 GS 30 RS 31
US 32 33 ! 34 " 35 36 37
38 39 ' 40 (
17
Lots of Bytes
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 multipliers
You can see in this 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? One CD holds 650 megabytes
which is also 0.65 GB. Computers typically hold
about 10 GB if information.
18
Hexadecimal Numbers
Hexadecimal system is a base 16 system Hex
numbers use 16 digits
  • O0
  • 11
  • 22
  • 33
  • 44
  • 55
  • 66
  • 77
  • 88
  • 99
  • 10A
  • 11B
  • 12C
  • 13D
  • 14E
  • 15F

19
Hexadecimal number are cosely related to binary
numbers. A four bit hexadeciaml number can be
represented by one hexadecimal digit
151111F
0 1 0 0 1 1 1 1
79
8 F
20
An 16 bit number like the on below can be
represented with 4 hex digits
1111 1111 1111
1111
F F F
F
65,535
21
Zero, "0", is the smallest representations of a
color. It's almost the total absence of color. F
is 15 times the intensity of the color of 0.
Combinations of these digits create different
shades of a particular color. Double Zero, "00,"
is equal to zero hue. FF is equal to a pure
color. This color representation is done
three times, once for red, once for green, and
once for blue, in that order. Put the three,
two-digit, codes together and you get a 6-digit
hex code. The hex code is just a representation
of the red, green, and blue intensity, in that
order. The computer creates the three
intensities, mashes them together, and you get a
single shade of color. For an example, here
are the opposite ends of the color scale FFFFFF
22
The code above is equal to white. Why? Notice the
three colors are all set to FF. That means the
highest level of red, green, and blue. As I said
above, in a computer, or television, the
combination of all three primary colors creates
white. Now here's black 000000 This is
just the opposite. All three settings of red,
green, and blue are set to a total absence of
color. Black. Now, here are a few other
codes and their breakdown FFFF00
23
Let's start with the concern from up above,
yellow. The code above produces pure yellow.
Notice the red and the green are at full tilt.
There is no blue. By mashing the red and green up
against each other, the red cancels out the blue
and all that is left is the yellow. It's actually
a subtractive color method being employed in an
additive world. Man, this gets loopy,
huh? DC143C The code above creates a shade
of red called "crimson." The red setting, DC, is
pretty intense. There's not much green. Blue is
set a little less than halfway up. EE82EE
24
That's violet. The Red and the Blue are at pretty
high levels. The green is there, but at a lower
level. Now, this is not purple, but violet.
Purple, as I said above, is a combination of red
and blue alone. The code is 800080. Notice
there's no green at all. Just an equal amount of
red and blue. FFA500 That's orange.
There's lots of red, not quite an equal level of
green, and no blue. That's how the hex
codes work.
25
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com