Download presentation
Presentation is loading. Please wait.
Published byAubrey Neal Modified over 9 years ago
1
Data Storage – Part 1 CS 1 Introduction to Computers and Computer Technology Rick Graziani Fall 2013
2
Rick Graziani graziani@cabrillo.edu2 BIT – BInary digiT Bit (Binary Digit) = Basic unit of information, representing one of two discrete states. The smallest unit of information within the computer. The only thing a computer understands. Abbreviation: b Bit has one of two values: –0 (off) or 1 (on) –0 (False) or 1 (True) OFF ON
3
Rick Graziani graziani@cabrillo.edu3 Bits Two patterns are known as the state of the bit. For example, magnetic encoding of information on tapes, floppy disks, and hard disks are done with positive or negative polarity. The boxes illustrate a position where magnetism may be set and sensed; pluses (red) indicate magnetism of positive polarity (1 bit), interpreted as “present” and minuses (blue) (0 bit). 0000000011111111
4
Rick Graziani graziani@cabrillo.edu4 Bits Bits are really only symbols. Used to display the one of two different, discrete states. Bits are used as: –Storing data Numbers Text characters Images Sound Etc. –Processing data
5
Rick Graziani graziani@cabrillo.edu5 Boolean Operations Integrated Circuits (microchips) are used to store and manipulate (process) bits. This is done using Boolean operations (in honor of mathematician George Boole, 1815-1864). Boolean Operation: An operation that manipulates one or more true/false values Specific operations –AND –OR –XOR (exclusive or) –NOT Using Truth Tables we can uses different sets of logic operations to store, add, subtract, and more complicated operations with bit.
6
Boolean Algebra and logical expressions (Addendum) Boolean algebra (due to George Boole) - The mathematics of digital logic –Useful in dealing with binary system of numbers. –Used in the analysis and synthesis of logical expressions. Logical expressions – Expressions constructed using logical-variables and operators. –Result is: True or False Boolean algebra – In mathematics a variable uses one of the two possible values: 1 or 0 May also be represented as: –Truth or Falsehood of a statement –On or Off states of a switch –High (5V) or low (0V) of a voltage level Rick Graziani graziani@cabrillo.edu6
7
Used in electronics (Addendum) Electrical circuits are designed to represent logical expressions –Known as logic circuits. Used to make important logical decisions in household appliances, computers, communication devices, traffic signals and microprocessors. Three basic logic operations as listed below: –OR operation –AND operation –NOT operation A logic gate is an electronic circuit/device which makes the logical decisions based on these operations. Rick Graziani graziani@cabrillo.edu7
8
Logic gates (Addendum) Logic gates have: –one or more inputs –only one output The output is active only for certain input combinations. Logic gates are the building blocks of any digital circuit. Rick Graziani graziani@cabrillo.edu8
9
9 Boolean Operations - AND Truth tables (simple ones) AND operation –Both input values must be TRUE for output to be TRUE –Kermit is a frog AND Miss Piggy is an actress –Inputs to AND operation represent truth of falseness of the compound statement. AND = TRUE TRUE
10
Rick Graziani graziani@cabrillo.edu10 Boolean Operations Gate: –A device that computes a Boolean operation –A device that produces the output of a Boolean operation when given the operation’s input values. Gates can be: –Gears –Relays –Optic devices –Electronic circuits (microchips)
11
Rick Graziani graziani@cabrillo.edu11 Boolean Operations – AND Gate 0 = FALSE 1 = TRUE AND operation Both input values must be TRUE for output to be TRUE 0 0 0 Truth Table Inputs Output 0 0 1 1 0 1 0 0 1 0 0 1 0 0 0 1 1 1 1
12
Rick Graziani graziani@cabrillo.edu12 Boolean Operations - OR Truth tables (simple ones) OR operation –Only one input values must be TRUE for output to be TRUE –In Rick likes to surf OR Rick likes to go dancing. –Taking both courses will also TRUE. OR= TRUE TRUE True
13
Rick Graziani graziani@cabrillo.edu13 Boolean Operations – OR Gate 0 = FALSE 1 = TRUE OR operation At least one input value must be TRUE for output to be TRUE 0 0 0 Truth Table Inputs Output 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 1 1 1 1
14
Rick Graziani graziani@cabrillo.edu14 Boolean Operations - XOR Truth tables (simple ones) XOR operation –One and ONLY one input value can be TRUE for output to be TRUE –At noon Rick is going to surf the Hook XOR surf Liquor Stores (this is a surf spot) –Both cannot be true, as I cannot surf both spots at the same time. XOR= TRUE TRUE False
15
Rick Graziani graziani@cabrillo.edu15 Boolean Operations – XOR Gate 0 = FALSE 1 = TRUE XOR operation Only one input value is TRUE for output to be TRUE Truth Table Inputs Output 0 0 1 1 0 1 0 0 0 0 0 1 1 1 1 0 1 1 1 1 0 0
16
Rick Graziani graziani@cabrillo.edu16 Boolean Operations – NOT Gate 0 = FALSE 1 = TRUE NOT operation Only one input Opposite of input NOT FALSE = TRUE NOT TRUE = FALSE Truth Table Inputs Output 0101 01 1 10 0
17
http://www.cs.kent.edu/~volkert/F10- 10051/notes/logsim.html Rick Graziani graziani@cabrillo.edu17
18
Rick Graziani graziani@cabrillo.edu18 Another way to write it… 0 = FALSE; 1 = TRUE
19
Rick Graziani graziani@cabrillo.edu19 Binary Math
20
Rick Graziani graziani@cabrillo.edu20 Base 10 (Decimal) Number System Digits (10): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Number of: 10 4 10 3 10 2 10 1 10 0 10,000’s 1,000’s 100’s 10’s 1’s 1 2 3 9 1 0 9 9 1 0 0
21
Rick Graziani graziani@cabrillo.edu21 Base 10 (Decimal) Number System Digits (10): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Number of: 10 4 10 3 10 2 10 1 10 0 10,000’s 1,000’s 100’s 10’s 1’s 4 1 0 8 3 8 2 1 0 0 0 9 1 0 0 1 0
22
Rick Graziani graziani@cabrillo.edu22 Rick’s Number System Rules All digits start with 0 A Base-n number system has n number of digits: –Decimal: Base-10 has 10 digits –Binary: Base-2 has 2 digits –Hexadecimal: Base-16 has 16 digits The first column is always the number of 1’s Each of the following columns is n times the previous column (n = Base-n) –Base 10: 10,000 1,000 100 10 1 –Base 2: 16 8 4 2 1 –Base 16: 65,536 4,096 256 16 1
23
Rick Graziani graziani@cabrillo.edu23 Counting in Decimal (0,1,2,3,4,5,6,7,8,9) 1,000’s 100’s 10’s 1’s 0 1 2 3... 9 1 0 1... 1 8 1 9 2 0 2 1 2 1,000’s 100’s 10’s 1’s... 2 9 3 0 3 1... 9 1 0 0 1 0 1... 9 9 9 1 0 0 0
24
Rick Graziani graziani@cabrillo.edu24 Counting in Binary (0, 1) 8’s 4’s 2’s 1’s 0 1 1 0 1 1 0 0 1 0 1 8’s 4’s 2’s 1’s 1 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 Dec 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
25
Rick Graziani graziani@cabrillo.edu25 Binary Math (more later) 0 0 1 10 11 100 101 +0 +1 +1 +1 +1 + 1 + 1 0 1 10 11 100 101 110 111 00000000 11111110 + 1 + 0 -> + 1 1000 …… 00000000 11111111
26
Rick Graziani graziani@cabrillo.edu26 Base 2 (Binary) Number System Digits (2): 0, 1 Number of: 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s Dec. 2 1 0 10 1 0 1 0 17 70 130 255
27
Rick Graziani graziani@cabrillo.edu27 Base 2 (Binary) Number System Digits (2): 0, 1 Number of: 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s Dec. 2 1 0 10 1 0 1 0 17 1 0 0 0 1 70 1 0 0 0 1 1 0 130 1 0 0 0 0 0 1 0 255 1 1 1 1 1 1 1 1
28
Rick Graziani graziani@cabrillo.edu28 Converting between Decimal and Binary Digits (2): 0, 1 Number of: 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s Dec. 1 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 172 192
29
Rick Graziani graziani@cabrillo.edu29 Converting between Decimal and Binary Digits (2): 0, 1 Number of: 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s Dec. 70 1 0 0 0 1 1 0 40 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 128 1 0 0 0 0 0 0 0 172 1 0 1 0 1 1 0 0 192 1 1 0 0 0 0 0 0
30
Rick Graziani graziani@cabrillo.edu30 Computers do Binary 0 1 Bits have two values: OFF and ON The Binary number system (Base-2) can represent OFF and ON very well since it has two values, 0 and 1 –0 = OFF –1 = ON Understanding Binary to Decimal conversion is critical in computer science, computer networking, digital media, etc.
31
Rick Graziani graziani@cabrillo.edu31 Rick’s Program
32
Rick Graziani graziani@cabrillo.edu32 Rick’s Program
33
Rick Graziani graziani@cabrillo.edu33 Rick’s Program
34
Rick Graziani graziani@cabrillo.edu34 Decimal Math - Addition 10,000’s 1,000’s 100’s 10’s 1’s 1 6 5 1 0 + 1 6 5 9 5 ----------------------------- 50 1 13 1 3 1
35
Rick Graziani graziani@cabrillo.edu35 Binary Math - Addition 64’s 32’s 16’s 8’s 4’s 2’s 1’s 1 1 1 0 1 0 + 1 1 0 1 1 ----------------------------- 10 1 10 1 1 1 0 1 1 Double check using Decimal. Dec 58 27 + ----- 85
36
Rick Graziani graziani@cabrillo.edu36 Half Adder Gate – Adding two bits Inputs: A, B S = Sum C = Carry AND XOR A + B = 2’s 1’s
37
Rick Graziani graziani@cabrillo.edu37 Half Adder Gate – Adding two bits Inputs: A, B S = Sum C = Carry AND XOR A + B = 2’s 1’s 0 0 = 0 0 00 SC 0 0 0 + 0 ---- 0
38
Rick Graziani graziani@cabrillo.edu38 Half Adder Gate – Adding two bits Inputs: A, B S = Sum C = Carry AND XOR A + B = 2’s 1’s 0 1 = 0 1 10 SC 1 0 0 + 1 ---- 1
39
Rick Graziani graziani@cabrillo.edu39 Half Adder Gate – Adding two bits Inputs: A, B S = Sum C = Carry AND XOR A + B = 2’s 1’s 1 0 = 1 0 10 SC 1 0 1 + 0 ---- 1
40
Rick Graziani graziani@cabrillo.edu40 Half Adder Gate – Adding two bits Inputs: A, B S = Sum C = Carry AND XOR A + B = 2’s 1’s 1 1 = 1 1 01 SC 0 1 1 + 1 ---- 1 0
41
Rick Graziani graziani@cabrillo.edu41 Marble Adding Machine http://www.youtube.com/watch?v=GcDshWmhF4A&NR=1 &feature=fvwp http://www.youtube.com/watch?v=GcDshWmhF4A&NR=1 &feature=fvwp
42
Rick Graziani graziani@cabrillo.edu42 Flip-flops Flip-flop: A circuit built from gates that can store one bit, uses feedback. A means of storing bits such as RAM Modern computers use technologies with: –greater miniaturization –faster response times –additional circuitry DRAM (Dynamic RAM) SDRAM (Synchronous DRAM) PCs currently use DDR (double data rate) for RAM, DDR1, DDR2 and DDR3 –Type of SDRAM –Each type has types of DIMM (dual in-line memory module) slots (different number of pins)
43
Rick Graziani graziani@cabrillo.edu43 Example of Flip Flops storing bits (FYI) S = Set R = Reset DRAM (Dynamic RAM) –Each bit of data is stored in a separate capacitor within an integrated circuit. –Since real capacitors leak charge, the information eventually fades unless the capacitor charge is refreshed periodically.
44
Rick Graziani graziani@cabrillo.edu44 Types of RAM Understanding RAM Types: DRAM, SDRAM, DIMM, SIMM & More –http://proprofs.com/mwiki/index.php?title=Understanding_RAM_Types:_DR AM_SDRAM_DIMM_SIMM_And_Morehttp://proprofs.com/mwiki/index.php?title=Understanding_RAM_Types:_DR AM_SDRAM_DIMM_SIMM_And_More RAM - From Wikipedia, the free encyclopedia –http://en.wikipedia.org/wiki/RAMhttp://en.wikipedia.org/wiki/RAM DDR2 SDRAM - From Wikipedia, the free encyclopedia –http://en.wikipedia.org/wiki/DDR2_SDRAMhttp://en.wikipedia.org/wiki/DDR2_SDRAM Dynamic random access memory - From Wikipedia, the free encyclopedia –http://en.wikipedia.org/wiki/Dynamic_random_access_memoryhttp://en.wikipedia.org/wiki/Dynamic_random_access_memory
45
Data Storage – Part 1 CS 1 Introduction to Computers and Computer Technology Rick Graziani
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.