280 likes | 361 Views
RAM and Binary Numbers. Preview Questions:. What is 0000000101? What is 52 in binary? What is a file?. Random Access Memory (RAM) also called Main Memory or Primary Memory.
E N D
RAM and Binary Numbers Preview Questions: What is 0000000101? What is 52 in binary? What is a file?
Random Access Memory (RAM) also called Main Memory or Primary Memory • Stores program instructions and data needed for processing--the working memory (short-term memory) of a computer (like a human’s memory) • The primary storage area for programs and data in active use - RAM • It is volatile.
Analogy for RAM • Imagine you are sitting at a desk. • RAM is somewhat like the that surface – the number of applications that you can run is limited by the size of RAM. • RAM is good—get lots of it!
Microprocessor • Brain of the computer • Brain of the cell phone • Brain of the PDA See Unit D in your textbook
The Machine Cycle CPU Fetches, Sends back Main Memory Control Unit 1 Decode Fetch 2 RAM 4 Store 3 Execute Arithmetic/Logic Unit
Digital Cell Phones, converting sound Digital phones convert your voice into binary information (1s and 0s) and then compress it CDs also convert analog to digital: • Sampling: http://communication.howstuffworks.com/analog-digital3.htm • Making a CD http://electronics.howstuffworks.com/cd5.htm
Main Memory (RAM) • Is organized as a sequence of locations • Each location can contain a sequence of bits, representing data or an instruction • Locations are numbered with “addresses” from 0 to memory-size (can be huge, even gigabytes)
Why use binary numbers? • We can build computers that operate in base-10, but they would be expensive. • What is easier than having a switch be ON or OFF? • We use electricity that way—low current or high current. • High voltages indicate 1 and low voltages indicate 0
Data Representation: Bits The bit is the smallest unit of data; it is 1 or 0, that is, on or off work area 000 001 010 011 100 101 110 111
Base Ten Numbers • fixed point(usually representing integers) • floating point (decimals) • In base 10, a decimal integermeans: 587 7 x 100 =7 8 x 101 =80 5 x 102 =500 587 _______
1 x 20 =1 0 x 21 =0 1 x 22 =4 5 ---------- Base Two • Likewise, in base 2, a binary integer means: 101 work area
Base 2--another way to convert You can remember the places by exponentiation of 2: 1001 means you add 1 and 2^3, or 8 +1
What is this number in decimal? work area
What is this number in binary? 82 work area
Characters, marks, and more Letters, numbers, line feeds, and non-printing characters ASCII-8. Pronounced “ass-key” ASCII stands for American Standard Code for Information Interchange, has 256 different symbols-all Operating Systems fully understand ASCII. UNICODE allows for up to 65,536 different characters. It is more complex and not implemented on many Operating Systems, but it is on Windows NT and Windows XP.
Different characters held in RAM 00100001 = ???
ASCII (link) ASCII can use 256 characters -- the foreign language possibilities are below:
ASCII, Cont. • 32 is the ASCII code for a space. • So 32 = 00100000 in binary, and when the computer gets that data, it causes a space to appear. • Note: all the capital letters finish before the lower case letters appear • B = 66 • b = 98
What is a file? • See page 116 in your Concepts book!! • A collection of data on a storage medium • Filename conventions • Filename extension .txt .jpg .exe .doc
Seeing the three-letter extensions can save you from a virus!
How to see the three-letter extensions on your files • .txt = Text file • .sql = MySQL-Front file
In Windows XP, Go to Tools/Folder options/View tab • Do not hide file extensions
Vista has the same problem, with a wrinkle You can move the mouse over a file and its extension will appear Not in our Course Guide
How this looks in Vista Not in our Course Guide
Instructions for Vista Show extensions for known files types. • In Windows Explorer, choose Organize > Folder and Search Options. • Click the View tab in the Folder Options dialog box. • In Advanced Settings, deselect Hide Extensions For Known File Types. • Click OK. Not in our Course Guide
To Summarize: • What is 0000000101 in decimal? • What is 8 in binary? • What is a file? • Your moment of Zen http://youtube.com/watch?v=hut3VRL5XRE