CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture 4: 9/5/2002 Lecture 4: 9/5/2002 CS149D Fall 2002
Should cover sections 1.1 and 1.2 of Brookshear Text Outline Storage of Bits Main Memory Should cover sections 1.1 and 1.2 of Brookshear Text Lecture 4: 9/5/2002 CS149D Fall 2002
Boolean Operations The NOT operation NOT 1 = 0 NOT 0 = 1 Manipulate True and False: Boolean Operations The NOT operation NOT 1 = 0 NOT 0 = 1 Exclusive OR Output of 1 when exclusively one of its inputs is TRUE Copyright © 2003 Pearson Education, Inc. Lecture 4: 9/5/2002 CS149D Fall 2002
Gates1/3 Device implementing Boolean operation Current technology implements gates as small electronic circuits Building blocks from which computers are constructed Copyright © 2003 Pearson Education, Inc. Lecture 4: 9/5/2002 CS149D Fall 2002
Gates2/3 Copyright © 2003 Pearson Education, Inc. Lecture 4: 9/5/2002 CS149D Fall 2002
Gates3/3 Which Input bit patterns will cause the following circuit to produce an output of 1? XOR Inputs AND Output Lecture 4: 9/5/2002 CS149D Fall 2002
Flip Flop Circuit (set of connected gates) which the output will flip or flop between two values under control of external stimuli If both inputs are 0, output will not change (A = 0, B = 0) Placing 1 on upper input forces output to be 1 (A = 1, B= 0) Placing 1 on lower input forces output to be 0 (B = 1, A = 0) Flip Flop can be used to store value of a bit A Try Sequence? A B 1 0 then 0 0 B Copyright © 2003 Pearson Education, Inc. Lecture 4: 9/5/2002 CS149D Fall 2002
Other Bit Storage Techniques 1960s: Rings of magnetic material (Cores) threaded on wires Electric current through wires core magnetized in one of two directions Recently: Capacitor Metallic plates positioned // to each other with a small distance between them Connect voltage source and charge plates and then remove voltage source Capacitor is either charged or discharged. Two states (can represent 0 and 1) Technology can place millions of capacitors on a single chip Storage volatility Core: retain magnetic field after machine turned off Flip flop: looses data when power source turned off Charges on capacitors dissipate, and have to be replenished (need for refresh circuitry) Computer memory based on such technology called Dynamic Memory Lecture 4: 9/5/2002 CS149D Fall 2002
Main Memory Memory cells (words). Typical cell size is 1 byte Often measured in MB (megabyte 220), KB (Kilobyte 210), GB (Gigabyte 230) Each cell has an address (0, 1, ….) Operations: read, write Each cell can be accessed individually (random access memory RAM) Dynamic memory technology (DRAM) Bits arrangement within a cell Copyright © 2003 Pearson Education, Inc. Lecture 4: 9/5/2002 CS149D Fall 2002
Main Memory How many bits would be in the memory of a computer with 4KB memory? Lecture 4: 9/5/2002 CS149D Fall 2002