bit = binary digit
ASCII
= 256 combinations
1 bit code -- 2 combinations
0 1
2 bit code -- 4 combinations
00 01 10 11
3-bit code -- 8 combinations
000 001 010 011
100 101 110 111
4-bit code -- 16 combinations
0000 0001 0010 0011
0100 0101 0110 0111
1000 1001 1010 1011
1100 1101 1110 1111
ASCII Codes
A 01000001 0 00110000
B 01000010 1 00110001
C 01000011 2 00110010
D 01000100 3 00110011
ETC.
Morse Code
A ._ S ...
B _... T _
C _._.
D _.. W ._ _
E .
N _.
"NEWS" _. . . _ _ ...
Byte
Kilobyte
Megabyte
Gigabyte
Examples
60 characters / line
x 50 lines/page
= 3000 bytes / page
8 x 10 sq. in / page
x 300 x 300 dots / sq. in
= 7,200,000 dots / page
= 7,200,000 bits / page
= 7,200,000 / 8
= 900,000 bytes / page
floppy
Files
manage data on disk
files
database programs to support
"data model"
History
(E.F. Codd -- early 1970's)
Example: Student Record
Name ID YR College Major Address ...
("tuple" = record)
(Chamberlin and Boyce 1975?)
select ID from CLASS where (name = Jones) and (college = Merrill)
Up to this point in the lab, students should have registered for an account, used e-mail, read the newsgroup, and checked out the web site. This week in lab you will use the Write application program.
Bit = binary information digit
A bit represents the "atomic" unit of information. Memory and logic are made up of bits. A bit is either a 1 or a 0. They can be thought of as on/off, yes/no, or true/false as in boolean code. In the old days bits were represented as a hole punched into a card. These punch cards were then fed into and read from the computer. Currently memory circuits are made of switches, below a certain level a 0 is represented and above a certain level a 1 is represented. Prior to the late 1960's and 70's memory was constructed from a ferromagnetic material with fine wires. These magnetic cores could be magnetized to represent either a 1 or a 0.
1 bit code -- 2 combinations (2^1)
01
2 bit code -- 4 combinations (2^2)
00 01 10 11
3 bit code -- 8 combinations (2^3)
000 001 010 011
100 101 110 111
4 bit code -- 16 (2^4)
5 bit code -- 32 (2^5)
.
.
N (2^N)
Example:
3 bit binary code: 000 001 010 011 100 101 110 111 decimal equivalent: 0 1 2 3 4 5 6 7
In 3 bit binary code, for example, the number 110 is read right to left. The 0 represents the 2^0 place, the 1 next to it represents the 2^1 place, and the following 1 represents the 2^2 place. This is a binary code; therefore the base is 2. To convert that to decimal notation do the following:
110 = binary code
0 * 1 = 0 then 4+2 = 6; 6 is the equivalent number
1 * 2 = 2 in decimal notation.
1 * 4 = 4
Example:
Decimal is base 10; therefore the number 7436 would be computed as follows:
7436.....the 6 holds the 10^0 position. 6 * 1 = 6
the 3 holds the 10^1 position. 3 * 10 = 30
the 4 holds the 10^2 position. 4 * 100 = 400
the 7 holds the 10^3 position. 7 * 1000 = 7000
7000 + 400 + 30 + 6 = 7436
The difference is that decimal notation is base 10 and binary is base 2.
ASCII codes = American Standard Code for Information Interchange
The benefit of having a standard way to code information is that any operating system can understand ASCII code.
Example of ASCII code: 0100 0001 represents an A. (For the entire ASCII code see p. 525 in your book)
A Byte is equal to 8 bits. 1 byte represents one character. In binary, 2^8 = 256; therefore a 8 bit choice represents 256 possibilities.
Kilobyte 1024 bytes = 1 Kbytes (2^10 bytes) Megabyte 1024 * 1024 bytes = 1 Mbytes = 1 million bytes Gigabyte 1024 * 1024 * 1024 bytes = 1 Gbytes = 1 billion bytes
Text page: (60 chars/line) * (50 lines/page) = 3000 bytes/page
Fax page: (8x10 sq. in/page) * (300x300 dots/sq. in)
= 7,200,000 dots/page
= 7,200,000 bits/page
7,200,000bits/8 = 900,000 bytes/fax page
Modems began at 300 bits/second (or baud) and have gone from 1200, 2400, 9600, 14400, 19200 to V.32 or V.34 which is about 30,000 bits/second. For example, a 7,200,000 bit fax document at a rate of 34,000 bits/second equals 240seconds/page or 4 minutes/page. Data compression is a way to compress the data and speed up transmission. At a 10 : 1 compression 0.4 min of 24 seconds would be required to send a fax page.
Hierarchy of speeds:
fastest: Main memory
Hard disk
CDROM (ROM = read only memory; it can't be written to)
Floppy
slowest: Tape
A basic calculator is similar to a computer in that it contains a processor that is functionally similar to a computer chip. However, a calculator must be supplied with the instructions to execute a function each time the user wishes to do a task, such as finding the area of a circle. A computer contains the instructions and stores these instructions for various functions. The user does not need to know the instructions. A calculator has limited memory and no programs, but a computer contains data storage and instructions.
Database systems were a fairly recent event. In the 1950's computers were primarily used for scientific computation. The military wanted to use computers to calculate trajectories for shells, this was done by hand and was extremely time consuming. Business records were kept on punch cards. Sorting and listing machines were utilized to organize the information held on the punch cards. In the 1960's computers became a tool for business applications as well as scientific computation. Information management system (IMS) was the first system that kept records of data on disks. Banks and airline services still use some version of IMS for database management.
Databases are utilized, for example, by the airline industry. Travel agents and airlines need to be able to access one common shared data set. Users need to have the ability to update, retrieve, insert, and delete data simultaneously. In the airline business, user's around the world need to know if a flight is full or what seats are left. This requires one common database that is accessible to everyone.
The hierarchical database management system utilizes an upside down tree structure as a way to organize the information on the database. The advantage is it's high speed. The disadvantages are that it's hard to change and there is no query ability.
Currently the RDBMS model is utilized for database management. The data is organized in a tabular structure. A row is referred to as a record or "tuple". A column is a field. The advantage of the RDBMS over the HDBMS is that it's easy to add new information by simply adding another row to the table. The RDBMS also supports SQL or structured query language. SDL, created by Chamberlain and Boyce, is now an ANSI standard.
Hierarchy of storage:
-CPU
-Cache
-Main Memory
-Disk
hard
CD-ROM
floppy
-Archival
tape
Main memory is a form of electronic storage. It has a speed you can read/write to a single location called a register. The CPU (central processing unit) has a higher speed then main memory. Cache, like main memory, is a form of electronic storage;however, cache is much faster. The locality principle states that when the CPU accesses data in main memory it does so linearly. So if location[X] is retrieved, then the next location retrieved will probably be [X+1]. When the CPU makes it's first fetch to main memory, a block of data will be placed in cache. When the CPU goes to do fetch more data it will look in cache first. Cache is faster then main memory; therefore, the CPU will be able to get more done. Basically the problem is the mismatch in speed. As main memory speed increases to the level of the CPU, cache will no longer be needed.