460 likes | 532 Views
Announcements. Project 1 is due on October 16 th . Plan a meeting with your team. If you are not completing every problem on the homework, then please double your efforts. Be sure to use my office hours during the week. . Chapter 4. Understanding Computers. 4.1 History of Computers.
E N D
Announcements • Project 1 is due on October 16th. Plan a meeting with your team. • If you are not completing every problem on the homework, then please double your efforts. • Be sure to use my office hours during the week.
Chapter 4 Understanding Computers
4.1 History of Computers • 3000 years ago • Abacus (beads on wires) • 2000 years ago • Odometer • 1600’s • Slide Rule
4.1 History of Computers • Late 1600’s • Adding Machines (gears and linked cogs) • 1800’s • Analytical Engines that used Punch Cards • Late 1800’s • IBM used electricity with punch cards • 1930’s • Vacuum tubes developed
4.1 History of Computers • 1948 • Transistors replaces vacuum tubes • Note: • Both vacuum tubes and transistors are switching devices that can represent the 1’s and 0’s for binary numbers.
4.2 Numbering Systems • Binary Base 2 • Decimal Base 10 • Hexadecimal Base 16 • Octal Base 8
4.2 Numbering Systems • Why do we use the decimal system for everyday mathematics? • Answer: Fingers and Thumbs • Why do we use the binary system for computer mathematics? • Answer: Computers use voltage levels to perform mathematics. • 0-Volts and 5-Volts correspond to 0’s and 1’s
Binary Numbers • Bit • a single binary digit • Byte • 8 bits • Nibble • 4 bits • Megabyte • 8 million bits
Counting Binary Decimal Hexadecimal 0000 0 0 To the chalk board...
Example Problems • Convert the binary number 1100 1010 to decimal and hexadecimal. • How high can you count with 4 bits? • ...with 8 bits? • ...with 1 byte? • ...with 16 bits? • ...with 32 bits?
Class Exercise • Convert the hexadecimal number B43 to binary and decimal. • Convert the decimal number 127 to binary and hexadecimal.
Team Exercise • Convert the hexadecimal number 7A3 to binary and decimal. • Convert the decimal number 681 to binary and hexadecimal.
Latch Input Flip-Flop Output 4.2.3 Basic Building Blocks • Memory • Flip-Flops • a circuit made with transistors and stores one bit of a binary number • SIMM - single in-line memory module • a large collection of flip-flops
4.2.3 Basic Building Blocks • Memory • DIMM - dual in-line memory module • a larger collection of flip-flops • Disks and Hard drives • 1’s and 0’s are store in magnetic media
4.2.3 Basic Building Blocks • CPU - Central Processing Unit • Clock • square wave voltage • Processors • Logic Gates (Made with Transistors) • AND, NAND, OR, NOR, NOT, XOR • (See chalkboard)
Electrical Engineering • Logic Gate Investigations • What kind of logic gates are these?
Team Exercise • Add these binary numbers: 1001 0111 + 0111 1001 • What 2 kinds of logic gates are needed for computer addition?
Example Problem • What would be the truth table for the logic circuit shown in figure 4.18(a)? A B Y
Example Problem • What would be the truth table for the logic circuit shown 4.18(b)? A B Y
Team Exercise – 4 Minutes • What would be the truth table for the logic circuit shown below? A B X Y Note this is similar to the homework problem.
Team Exercise – 4 Minutes • What would be the truth table for the logic circuit shown below? A B X Y Note this is similar to the homework problem.
4.4 Computer Programs • Algorithm • a step-by-step procedure for solving a problem or accomplishing an end • Flowchart • a graphical description of an algorithm
Flowchart Symbols Input/Output Start/Stop Branch Test Calculation Process Flow
Flowchart Example Begin (again?) Define the problem Read input Ask for more input yes Can I solve this? Can I solve this? What do I need to know? no no Not available at this time yes Solve the problem Output results End
Example • Sketch a simple flowchart that will find the sum of two number and their difference.
Example Each month, the electric company bills consumers according to the following schedule: Electricity Usage (kWh) Rate ($/kWh) Energy 1000 0.10 1000 < Energy 10000 0.08 Energy > 10000 0.06 Prepare a flowchart that calculates the bill for a customer.
Homework 5 Examples similar to problems 5 and 6
Start Example: Sketch a flowchart that will find the smallest number in a series of 100 numbers. I = 1 Input N Min=N I = I+1 Yes I>100? Output Min No Input N Stop N<Min? No Yes
Start Example: Prepare a flowchart that determines the volume and area of a cube in which the length of one edge increases from 1 to 10 meters in 1 meters increments. a = 1 V=a3 A=6a2 Output a, V, A a = a+1 Stop No a>10? Yes
Example • Sketch a flowchart that will find the smallest number in a series of 100 numbers.
Example • Prepare a flowchart that determines the volume and area of a cube in which the length of one edge increases from 1 to 10 meters in 1 meters increments.
Example • Sketch a flowchart that will compute the factorial of a number.
Problem 4.9(a) • Find the sum of the first 50 terms of this series.
Example • Sketch a flowchart that will compute the first 10 terms of the Taylor series of ex for a given x.
Example The Fabonacii series is 1, 1, 2, 3, 5, 8, 13, 21, 34, ... Prepare a flowchart to calculate the first 50 terms of the Fabonacci series.
Example Prepare a flowchart that sorts 10 numbers from highest to lowest.
Chapter 4 Understanding Computers
Readiness Assessment Test #2 Chapter 4 Reading • How many bits are in a megabyte? • How high can you count with 4 bits? • Decimal is a base 10 number system. What is the base for hexadecimal? • What is the base for octal? • What is the decimal equivalent of the binary number 1010?
Facilitator – Clicker Question Which logic gate with give the truth table to the right? • AND • BUT • OR • NOR • NAND • XOR • NOT • The facilitator is not here.
Gatekeeper – Clicker Question Which logic gate with give the truth table to the right? • AND • BUT • OR • NOR • NAND • XOR • NOT • The gatekeeper is not here.
Timekeeper – Clicker Question Binary 1110 is equal to the decimal number ______ • 10 • 11 • 12 • 13 • 14 • 15 • 16 • The timekeeper is not here.
Recorder – Clicker Question Binary 1011 is equal to the decimal number ______ • 10 • 11 • 12 • 13 • 14 • 15 • 15 • The recorder is not here.
Remember Your Team Roles • Recorder - doing the writing • Facilitator - keeping focus • Time Keeper - keeping track of time • Gatekeeper – encouragement