Computer Fundamentals ELEC 330 Digital Systems Engineering Dr. Ron Hayne
330_012 Review of Number Systems Number Systems (Conversions) Binary Octal Hex Negative Numbers Two’s Complement Sign Extension Arithmetic Addition (Subtraction) Codes BCD ASCII
330_013 Positional Number Systems
330_014 Binary
330_015 Number Systems
330_016 Octal and Hexadecimal
330_017 Octal and Hexadecimal
330_018 Conversions = ? R 12 3 R 02 1 R 12 0 R 1 (MSB) x 2 = x 2 = x 2 = 1.0 (LSB) =
330_019 Binary Addition (Full Adder) C IN XYC OUT S
330_ bit Addition Example X + Y S
330_0111 Negative Numbers
330_0112 Two’s Complement MSB serves as sign bit (fixed-width) 0 => positive 1 => negative Negation Operation Complement all bits Add 1 Alternate Negation Operation Starting from right to left Copy up to and including the first 1 Complement the rest
330_ = = Two’s Complement (4-bit) = = =
330_0114 Two’s Complement Arithmetic Examples (4-bit) = = ?
330_0115 Overflow Operation produces a result that exceeds the number system Example (4-bits) Range -8 to +7 Detection Rule Overflow occurs if the addends’ signs are the same, but the sum’s sign is different from the addends’
330_0116 Sign Extension Converting a Two’s Complement Number to an Equivalent with More Bits 4-bit to 8-bit 8-bit to 16-bit Reproduce the Sign Bit +6 = bit = bit -6 = bit = bit
330_0117 Binary-Coded Decimal (BCD) Encodes digits 0 thru 9 4-bit unsigned binary 0000 thru 1001 6 unused code words 1010 thru 1111 Packed BCD 8-bit byte 2 BCD digits
330_0118 BCD Arithmetic Correction made if result exceeds 1001 Add 6 Produces carry
330_0119 Character Codes ASCII (7-bits) American Standard Code for Information Interchange
330_0120 Summary Number Systems (Conversions) Binary Octal Hex Negative Numbers Two’s Complement Sign Extension Arithmetic Addition (Subtraction) Codes BCD ASCII
330_0121 Digital Systems Logic Gates Building Blocks Combinational Sequential Memory Examples Synchronous Serial Communications Instruction-controlled Information Processor
330_0122 Logic Gates X Y X Y X _
330_0123 More Logic Gates X Y _____ X Y _____
330_0124 Binary Decoder (n-to-2 n ) Activates exactly one of 2 n outputs based on an n-bit input value
330_0125 Multiplexer Digital Switch Selects 1 of n sources Based on s control lines n = 2 s Sources b bits wide
330_0126 Arithmetic Logic Unit (ALU)
330_0127 Edge-Triggered D Flip-Flop
330_ bit Binary Counter Synchronous Active-low Load Active-low Clear Two Enables ENP (parallel) ENT Ripple Carry Out RCO (ENT) Cascading
330_0129 Universal Shift Register
330_0130 Register Notation Serial Transfer Parallel Transfer Register Contents RC Logical Shift Left0 R B 5
330_0131 Buses and Transfer Gates Transfer 8 8
330_0132 Memory Organization Dimensions n-bit words k-bit address Operations Read, Load, Fetch Write, Store Memory first word next word last word n bits Address k
330_0133 Memory Memory Signals Memory Model Mem Address Data Read/Write Clock 0000 C329B6 C23AC1 C23B33 FFFF22
330_0134 Example Digital System Synchronous Serial Communications Parallel Register Shift Register Control Unit CountF Slave Device Master Device Transmit Receive Clock
330_0135 Example Digital System Instruction-controlled Information Processor Arithmetic Logic Unit Registers Transfer Gates Input Port Output Port Control Unit
ALU AB OUT Processor XIN LALB XAXB LOUT C0 C1 Control Unit C0 C1 XA XB LA LB XIN LOUT Clock OUT IN C0 C1Operation 00 IN1 + IN2 OUT 01 IN1 + IN2 + 1 OUT 10 IN1 + IN2 OUT 11 IN1 + IN2 + 1 OUT
330_0137 System Operation IN - B OUT Control Signals StepRTLXINLALBXAXBC0C1LOUT 1 IN A A - B A A OUT X00XXXX1
330_0138 Summary Logic Gates Building Blocks Combinational Sequential Memory Examples Synchronous Serial Communications Instruction-controlled Information Processor
330_0139 Processors Stored Program Processors General-Purpose Computers Microprocessors Microcomputers Microcontrollers
330_0140 Building Blocks Clock Processor ALU Registers Control Unit Memory Input/Output
330_0141 Stored Program Processor Input/ Output Processor Control Unit In Out Data Memory Data Control Instruction Control/Status Clock
330_0142 Memory Instructions Program Software Data Load Store Memory Model 0000 C329B6 C23AC1 C23B33 FFFF22
330_0143 Instruction Operation Fetch Phase PC Program Counter IR Instruction Register M[PC] IR PC + 1 PC Execute Phase Instruction dependent Example: Load Accumulator A LDAA $34 M[34] A
330_0144 General-Purpose Computer Arithmetic Operations Logical Operations Load and Store Operations Testing and Branching Input and Output
330_0145 Computer Architecture Princeton von Neumann Memory holds both instructions and data Input/ Output Processor Control Unit In Out Data Memory Data Control Instruction Control/Status Clock
330_0146 Computer Architecture Harvard Separate instruction and data memories Input/ Output Processor Control Unit In Out Data Memory Data Control Instruction Control/Status Clock Instruction Memory
330_0147 Microprocessor/Microcomputer Microprocessor Single Integrated Circuit (IC) Processor and Control Unit Microcomputer Single Printed Circuit Board Interconnection of multiple ICs Microprocessor, Memory, I/O, Clock Microcontroller Single-Chip Microcomputer
330_0148 Microcomputer/Microcontroller Input/ Output Processor Control Unit Memory Clock Microcomputer/Microcontroller Microprocessor
330_0149 Embedded Control Systems Microcomputer inside a device that is not called a computer Satellite TV Receivers Microwave Ovens Programmable Thermostats Automobiles Robotics
330_0150 Personal Computers PC Collection of components that contain many microcomputers Central Microcomputer (CPU) Keyboard Controller Disk Drive Interface Display Monitor Interface Printer
330_0151 Summary Stored Program Processors General-Purpose Computers Microprocessors Microcomputers Microcontrollers