Download presentation
Presentation is loading. Please wait.
Published byBarnard Logan Modified over 9 years ago
2
A bit about the computer Bits, bytes, storage and so on Some of this material can be found in Computing Essentials 2000-2001 (O’Leary and O’Leary) pp. 70-72 and Chapter 6
3
A computer is 4 a person or thing that computes 4 to compute is to determine by arithmetic means (The Randomhouse Dictionary) 4 so computing involves numbers 4 While typing papers, drawing pictures and surfing the Net don’t seem to involve numbers at first, numbers are lurking beneath the surface
4
Representing numbers 4 Some attribute of the computer is used to “represent” numbers (for example: a child’s fingers) 4 two kinds of representation are: –analog the numbers represented take on a continuous set of values –digital the numbers represented take on a discrete set of values
5
Pros and Cons 4 the analog representation is fuller/richer after all there are an infinite number of values available 4 the digital representation is safer from corruption by “noise;” there is a big difference between the various discrete values, and smaller, more subtle differences do not affect the representation
6
Digital signals 0 1 1 0 1 0 0 0
7
Our computers are 4 digital and electronic –(note that digital electronic) 4 they are electronic because they use an electronic means (e.g. voltage or current) to represent numbers –Gives computers their speed and small size 4 they are digital because the numbers represented are discrete –Noise resistant
8
Binary representation 4 the easiest distinction to make is between –low and high voltage –off and on 4 then we can only represent two digits: 0 and 1 4 but we can represent any (whole) number using 0’s and 1’s
9
Decimal vs. Binary 4 Decimal (base 10) –124 = 100 + 20 + 4 –124 = 1 10 2 + 2 10 1 + 4 10 0 4 Binary (base 2) –1111100 = 64 + 32 + 16 + 8 + 4 + 0 + 0 –1111100 = 1 2 6 + 1 2 5 + 1 2 4 + 1 2 3 + 1 2 2 + 0 2 1 + 0 2 0
10
Bits and Bytes 4 A bit is a single binary digit (0 or 1). –The elementary unit of information 4 A byte is a group of eight bits. 4 A byte can be in 256 (2 8 ) distinct states (which we might choose to represent the numbers 0 through 255). 4 Note computer scientists like to start counting with zero.
11
Realizing a bit 4 We need two “states,” e.g. –high or low voltage (e.g. computer chips) why you should protect computer from power surges –north or south pole of a magnet (e.g. floppy disks) why you should keep floppies away from large magnets –light or dark (e.g. reading CD or DVD, also laser printers) –hole or no hole (e.g. punch card or CD)
12
Representing characters 4 Combinations of 0’s and 1’s can be used to represent characters 4 This is most commonly done using ASCII code 4 A merican S tandard C ode for I nformation I nterchange –HEY, THAT’S AN ACRONYM
13
ASCII code (a byte per character) 4 0 00110000 8 00111000 G 01000111 4 1 00110001 9 00111001 H 01001000 4 2 00110010 A 01000001 I 01001001 4 3 00110011 B 01000010 J 01001010 4 4 00110100 C 01000011 K 01001011 4 5 00110101 D 01000100 L 01001100 4 6 00110110 E 01000101 M 01001101 4 7 00110111 F 01000110 N 01001110
14
More, more, more 4 A kilobyte is 1,024 (2 10 ) bytes –approx. one thousand 4 A megabyte is 1,048,576 (2 20 ) bytes –approx. one million 4 A gigabyte is 1,073,741,824 (2 30 ) bytes –approx. one billion 4 A terabyte is 1,099,511,627,776 (2 40 ) bytes –approx. one trillion
15
Storing it away 4 A standard 3.5 inch floppy disk holds 1.44 MB (megabytes) 4 An Iomega Zip disk holds approx. 100 MB or 250 MB –(many labs at LaSalle now have zip drives) 4 A CD (compact disk) holds approx. 650 MB 4 A DVD (digital versatile [video?] disc) holds several GB (gigabytes) 4 A typical hard drive holds several GB –Less portable, but faster
16
Anatomy of a disk Write protection tab Shutter or clip label Sectors: wedge-shaped Tracks: concentric circles
17
The Poisonwood Bible 65 characters per line 35 lines per page 4 A typical page of the novel by Barbara Kingsolver has 2275 = 35 65 characters
18
The Poisonwood Bible (cont.) 4 The book is 543 pages long 4 Altogether that’s approximately 1,235,325 = 543 35 65 characters 4 So it’s 1,235,325 bytes (a byte per character) 4 That’s 1200 kilobytes 1.2 megabytes 4 A floppy is 1.44 MB, –Because of inefficient storage, it would most likely take two floppies
19
Some qualifying remarks 4 The previous calculation was for text only, no graphics and no formatting 4 Formatting includes –Margins –Fonts (type, color, size, bold, etc.) –Spacing – Headers –ETC. 4 A Word file will be much bigger than a WordPad or Notepad file because of formatting
20
True or False 4 A boolean expression is a condition that is either true or false (on or off) 4 Logical operators: –like an arithmetic operator (e.g. addition) that takes in two numbers (operands) and yields a number as a result (1+1=2) –Logical operators take in two boolean expressions and produces a boolean outcome
21
AND 4 use to narrow searches
22
Example of “AND” Olympics AND drug testing Drug testing in the olympics
23
OR 4 use to widen searches
24
Example of “OR” “Performance enhancing drugs” OR “drug testing” Either the use of or screening for or both Performance enhancing drugs Drug testing
25
Transistors 4 When bits are represented using voltage, the logical operators (gates) can be constructed from transistors 4 The Pentium ® II has approximately 7.5 million transistors on it 4 The transistors have lengths approximately 0.35 microns (millionths of a meter)
26
Extra slides 4 The following slides are on converting numbers from decimal to binary 4 Don’t panic. I never ask this on tests. 4 I just like to expose people to it.
27
Decimal Binary 4 Take the decimal number 76 4 Look for the largest power of 2 that is less than 76. 4 The powers of 2 are 1, 2, 4, 8, 16, 32, 64, 128, 256, etc. 4 So the largest power of 2 less than 76 is 64=2 6.
28
Decimal Binary (76 1001100) 4 Put a 1 on the 2 6 ’s place, and subtract 64 from 76 leaving 12. 4 Ask if the next lower power of 2, 32=2 5 is greater than or less than or equal to what we have left (12).
29
Decimal Binary (76 1001100) 4 32 is greater than 12 so we put a 0 in the 2 5 ’s place. 4 16 is greater than 12 so we put a 0 in the 2 4 ’s place.
30
Decimal Binary (76 1001100) 4 8 is less than 12, so we put a 1 in the 2 3 ’s place, and subtract 8 from 12 leaving 4.
31
Decimal Binary (76 1001100) 4 4 is equal to 4, so we put a 1 in the 2 2 ’s place, and subtract 4 from 4 leaving 0. 4 2 is greater than 0 so we put a 0 in the 2 1 ’s place.
32
Decimal Binary (76 1001100) 4 1 is greater than 0 so we put a 0 in the 2 0 ’s place.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.