Download presentation
Presentation is loading. Please wait.
Published byJoel Joseph Modified over 7 years ago
1
4th Edition Chapter 9 Computer Engineering Part1: Introduction
2
What is Computer Engineering?
Computer engineers usually have training in electrical or electronic engineering, software design, and hardware-software. Computer engineers are involved in many hardware and software aspects of computing, from the design of individual microprocessors, personal computers, and supercomputers, to circuit design. This field of engineering not only focuses on how computer systems themselves work, but also how they integrate into the larger picture
3
What is “Computation”? Determining an output by mathematical means
Manual computation Aids for computation Automated computation ×8 + 67/89 = ? Starting at the beginning, we find the definition of computation is determining an output by mathematical means. Man first learned to do this by hand, then developed mechanical aids, and now relies heavily on automated devices Exploring Engineering
4
Historical Roots of the Computer
Mechanization and automation of arithmetic punched card machinery difference and analytical engines analog computing devices Automatic control and logic theory automatic control of mechanisms development of logic theory In a simplified view of the history of the computer, we can divide the developments into two categories: 1. The mechanization and automation of arithmetic 2. Automatic control and logic theory Mechanization of arithmetic has very early roots, but the developments that influenced the modern computer - punched card machines, differential and analytical engines, and analog computing devices, were mostly developed in the 19th century Likewise, while there were some very early automatic control of mechanisms, the logic theory used in modern computers was developed relatively recently ( ). Exploring Engineering
5
Mechanization of Arithmetic
Abbacus (? BC) Slide Rule & logarithms (1600) Adding Machines - mechanical (1642) As we mentioned, the mechanization of arithmetic has very early roots - back tot he abacus, thousands of years ago. The discover of logarithms in the 1600s led to the more powerful aid: the slide rule. And mechanical adding machines were developed as early as the 1600s as well. Exploring Engineering
6
Punched Card Machinery
Jaquard’s Loom (1810) Cards used to determine weaving pattern hole - no lever pushed no hole - lever pushed Tied together with ribbons to provide a sequence of patterns Punched card machinery was one of the most important parts of computer history. The first example was Jaquard’s Loom - developed in The loom was used to weave cloth. Jaquard devised a way to automate the process. Control levers were used to determined which yarns were used on each pass of the loom. A card, pressed against the levers, would activate some (no hole) and not activate others (hold) and by tying the cards together, a string of command was “programmed” to create a weaving pattern for the loom. Humans were no longer needed to remember and specify the pattern. Exploring Engineering
7
Tabulation and Punched Cards
Herman Hollerith Tabulating machine for the 1890 Census Led to the development of the punched card computer input The idea of the punched card was used by Herman Hollerith when he developed a way to automate counting people for the 1890 census. In his first machines, spring-loaded pins were used to sense a hole by going through the hole and into a mercury cup to complete an electric circuit. His company eventually became IBM and the cards used in the tabulating machine became the punched card computer input, used up until the early 80s. Exploring Engineering
8
Difference and Analytical Mechanical Computers
Charles Babbage (early 1800s) Difference Engine Analytical Engine Difference and Analytical Engines were used to calculate mathematical tables. Although the difference and analytical engines designed by Charles Babbage in the early 1800s did not lead directly to the development of the modern computer, in retrospect we find many of the same components: mechanisms for loops and branches and printing Exploring Engineering
9
Analog Computing Devices
Analog - quantities being computed are direct proportions of the actual physical problem. Analog electronic computers based on the operational amplifier, first constructed with vacuum tubes Although today’s computers are digital - using discrete quantities of information, analog computers had their place in the history of computer development. Basically, analog quantities are continuous in nature - like real numbers in mathematics. Digital quantities are discrete, like integers. Analog computing devices operate on these continuous quantities, as in this caliper, where the sliding scale is a direct proportion of the distance measured. Analog electronic computers, like digital computers when they arrived, first used vacuum tubes as basic components. Exploring Engineering
10
Logic Theory George Boole, Augustus DeMorgan (~1850) True False 1 0
Boolean Algebra - algebra where variables can take on only two values Claude E. Shannon (1938) Switching Theory - relates logic to switch implementation True False In the area of logic, the most important developments were not the machines, but the theory. Boole and DeMorgan formalized Boolean Algebra, and Claude Shannon developed switching theory. In Boolean Algebra, variables take on one of two values - can use true/false or 1/0. Example of a Boolean variable: L = “the light is on in this room” - can be either true or false. Now we will look at some Boolean operators and their truth tables. AND of variables X and Y: X · Y (notice this is similar to the symbol for multiplication. As in multiplication, sometimes concatenation is also used for the AND operation) AND of variables X and Y: XY OR of variables A and B: A + B NOT of variable X X’ (notice the NOT operator only operates on one variable) Truth tables are often used to define these operations. The truth table describes the result of the operation for all possible values that the Boolean variable may take. AND OR NOT in out X Y X · Y X Y X + Y X X' Exploring Engineering
11
Boolean Expression: S = K · P
Boolean variables - can be true or false: S - the car will start K - Key is in the ignition of the car P - the car is in Park “The car will start if the key is in the ignition and the car is in park.” output input input Here are some examples of Boolean variables. We can classify some as inputs, others as outputs. Boolean Expression: S = K · P Exploring Engineering
12
Boolean Logic Example Seat Belt Warning Light
D is true if any door of the car is open. PS is true if there is a passenger in the passenger seat. K is true if the key is in the ignition. M is true if the motor is running DB is true if the driver seatbelt is fastened PB is true if the passenger seatbelt is fastened "The seatbelt warning light should be on in my car if W = ____________________________________" Have students work in groups of 2 on these. Possible answers: 1. For an early warning system, the warning light should be on if all the doors are closed, the key is in the ignition and either the driver's seatbelt is not fastened or there is a passenger in the passenger seat and their seatbelt is not fastened. W = D' · K · (Db' + PS · Pb') (notice that the light will be on even if nobody is in the car…. discuss the idea of adding another variable Ds, drivers seatbelt fastened. 2. For a later activation of the warning light, the light will go on if all the doors are closed, the motor is running, and either the driver's seatbelt is not fastened or there is a passenger in the passenger seat and their seatbelt is not fastened. W = D' · M · (Db' + Ps · Pb') 3. For a really annoying warning light, the light will go on whenever the driver's seatbelt or the passenger seatbelt is not fastened. W = Db' + Pb' Exploring Engineering
13
Logic and Binary Numbers
Logic Binary Number 0 = False 1=True 0 = zero 1 = one Decimal = Base 10 __ __ __ __ __ . __ __ __ Binary = Base 2 _ _ _ _ _ . _ _ _ The value of a digit depends on it's position relative to the "binary point“ (instead of the “decimal point”). You might want to remind them that the decimal number system is weighted, so for example, the value of number is found by: 5* * * *10-1 Example: binary = 1 * * * * * * * *2-3 = = (decimal) To count in binary we simply start with zero, and continue to add one to the count. (Leave this on the board because it helps in future problems.) binary count decimal equivalent 0 0 1 1 10 2 11 3 100 4 101 5 110 6 111 7 1000 8 1001 9 Exploring Engineering
14
Decimal Numbers A “digit” is a place that can hold numerical values between 0 and 9. Digits are combined together to create larger numbers. For the number 6,357, the 7 is in the "1s place," the 5 is in the 10s place, the 3 is in the 100s place and the 6 is in the 1,000s place. So you could express it as: (6 × 1000) + (3 × 100) + (5 × 10) + (7 × 1) = = 6357 Another way to express it is like this: (6 × 103) + (3 × 102) + (5 × 101) + (7 × 100) = = 6357 What you can see from this is that each digit is a placeholder for the next higher power of 10, starting in the first digit with 10 raised to the power of zero. Exploring Engineering
15
Binary (Base 2) Numbers Exploring Engineering Binary Number System
System Digits: 0 and 1 Bit (short for binary digit): A single binary digit Upper Byte (or nybble): The right-hand byte (or nybble) of a pair Lower Byte (or nybble): The left-hand byte (or nybble) of a pair Binary Equivalents 1 Nybble (or nibble) = 4 bits 1 Byte = 2 nybbles = 8 bits 1 Kilobyte (KB) = 1024 bytes 1 Megabyte (MB) = 1024 kilobytes = 1,048,576 bytes 1 Gigabyte (GB) = 024 megabytes = 1,073,741,824 bytes Exploring Engineering
16
Binary (Base 2) Numbers Exploring Engineering
Computers use binary numbers, and therefore use binary digits in place of decimal digits. 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 the decimal value of the binary number 1011? You do it in the same way we did it for the decimal number 6357, but you use a base of 2 instead of a base of 10. For example: 1011 = (1 × 23) + (0 × 22) + (1 × 21) + (1 × 20) = = 11 Exploring Engineering
17
Binary Counting from 1 to 20
0 = 0 1 = 1 2 = 10 3 = 11 4 = = = = = = = 1010 11 = = = = = = = = = = 10100 Exploring Engineering
18
Bits and Bytes With 8 bits in a byte, you can represent 256 values ranging from 0 to 255, as shown here: 0 = = = = = Exploring Engineering
19
CDs and Bits A CD uses 2 bytes, or 16 bits, per sample. That gives each sample a range from 0 to 65,535, like this: 0 = = = = = Exploring Engineering
20
CD Data The total amount of digital data that can be stored on a CD is: 44,100 samples/channel/second x 2 bytes/sample x 2 channels x 74 minutes x 60 seconds/minute = 783,216,000 bytes To fit more than 783 megabytes (MB) onto a disc only 4.8 inches in diameter requires that the individual bytes be very small. By examining the physical construction of a CD, you can begin to understand just how small these bytes are. Exploring Engineering
21
How CDs are Made A CD is a fairly simple piece of plastic, about four one-hundredths (4/100) of an inch (1.2 mm) thick. Most of a CD consists of an injection-molded piece of clear polycarbonate plastic. During manufacturing, this plastic is impressed with microscopic bumps arranged as a single, continuous, extremely long spiral track of data. We'll return to the bumps in a moment. Once the clear piece of polycarbonate is formed, a thin, reflective aluminum layer is sputtered onto the disc, covering the bumps. Then a thin acrylic layer is sprayed over the aluminum to protect it. Exploring Engineering
22
How CDs Work An infrared laser is focused onto the metallic reflective layer of the disc, where a spiral track of “pits” and “lands” represents the zeros and ones of digital signals. Exploring Engineering
23
Bits, Bytes, Nybbles, and Words
bit: A binary digit: 0 or 1 Nybble: 4 bits Byte: 8 bits Word: 4 bytes = 32 bits base 2: Numbers composed of bits base 10: Numbers composed of the digits 0-9 base 16: Numbers composed of the digits 0-9 and letters A-F. Also called hexadecimal or hex. Exploring Engineering
24
The Future of Bytes Computers are described as having megabytes and gigabytes of memory. In 64-bit CPU's, memory can be in terabytes, petabytes, and exabytes. One kilobyte equals 2 to the 10th power, or 1,024 bytes One megabyte equals 2 to the 20th power, or 1,048,576 bytes One gigabyte equals 2 to the 30th power, or 1,073,741,824 bytes One terabyte equals 2 to the 40th power, or 1,099511,627,776 bytes One petabyte equals 2 to the 50th power, or 1,125,899,906,842,624 bytes One exabyte equals 2 to the 60th power, or 1,152,921,504,606,846,976 bytes One zettabyte equals 2 to the 70th power, or 1,180,591,620,717,411,303,424 bytes One yottabyte equals 2 to the 80th power, or 1,208,925,819,614,629,174,706,176 bytes Exploring Engineering
25
Binary Numbers and Computers
The reason computers use the base 2 system is because it is easy to implement with simple electronic “on/off” switching technology. You could build computers that operate in base-10, but they would be expensive, whereas base-2 computers are relatively cheap. Exploring Engineering
26
Binary Addition Rules of Binary Addition 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1
1 + 1 = 0, and carry 1 to the next more significant bit Examples Exploring Engineering
27
Rules of Binary Subtraction
0 - 0 = 0 0 - 1 = 1, and borrow 1 from the next more significant bit 1 - 0 = 1 1 - 1 = 0 Example * * * * (starred columns are borrowed from) − Exploring Engineering
28
Rules for Binary Multiplication
Rules of Binary Multiplication 0 x 0 = 0 0 x 1 = 0 1 x 0 = 0 1 x 1 = 1, and no carry or borrow bits Example 101 (decimal 5) 11 (decimal 3) 101 1010 (decimal 5) Exploring Engineering
29
More Binary Arithmetic
Addition and Subtraction Examples (Notice the use of “carry” and “borrow”) 1001 (decimal 9) (decimal 5) (decimal 14) 100 (decimal 4) You might go through these examples and then ask students to do a simple one like: 1011 +110 Exploring Engineering
30
Using Logic to Describe Binary Arithmetic
Definition of the variables Truth table for the for binary addition: variables C and S: A + B = C S A B C S 0 + 0 = 0 + 1 = 1 + 0 = 1 + 1 = Emphasize that the 0 and 1 are “zero and one” (on the left side) and “true and false” (on the right side). But they describe the same thing - addition of two 1-bit numbers. So Boolean expressions (and later logic circuits) can implement binary arithmetic. Working the example: Notice that C is 1 only when A AND B are 1. C = A · B Notice that S is 1 if A is false AND B is true OR if A is true AND B is false. S = A' · B + A · B' These two equations describe a “half-adder” circuit, a basic component of every computer chip. Exploring Engineering
31
Bits to Describe Information
Binary Number 00 = 0 01 = 1 10 = 2 11 = 3 Information 00 = “red” 01 = “blue” 10 = “yellow” 11 = “green” Logic 0 = False 1 = True Another way we use 1 and 0 in the computer is to CODE information. Suppose we wanted to develop unique codes for the following basic colors: red, blue, yellow, green, black, brown, white, orange, purple Can we do this with three 0s and 1s (bits)? No, because there are only 8 combinations of three bits. 000, 001, 010, 011, 100, 101, 110, 111 (note: ) Here is a code that would work, but of course it is not the only one. red 0000 blue 0001 yellow 0010 green 0011 black 0100 brown 0101 white 0110 orange 0111 purple 1000 To code N unique things, we need log2N bits. In other words, if we have n bits, we can code 2n different things. You might ask how many bits are needed to code the 26 letters? How about when both upper and lower case are considered? With n bits, we can code 2n different elements Exploring Engineering
32
What is ASCII? American Standard Code for Information Interchange (ASCII), pronounced ASK-ee, is a character encoding based on the English alphabet. ASCII is a seven-bit code, meaning it uses patterns of seven binary digits (a range of 0 to 127 decimal) to represent each character. The first edition of the standard was published in with 94 printable ASCII characters, numbered 33 to 126 (decimal). Exploring Engineering
33
ASCII Symbol Decimal Binary A B C D E F G Exploring Engineering
34
ASCII-Binary Converters
The following web sites have interactive ASCII-Binary converters: Exploring Engineering
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.