WEEK 2: OPERATIONS of COMPUTER HARDWARE Your Week 2 includes: 1. Operations of Computer Hardware. 2. Operands of Computer Hardware. 3. Signed and Unsigned Numbers. 4. Representing Instructions in the Computer. Before understanding these topics, we must know what MIPS is. 1. What is MIPS? MIPS is an instruction set architecture (ISA). Historically, the name MIPS stands for Microprocessor without Interlocked Pipelined Stages. It defines the instructions that a MIPS processor can understand and execute. In simple words: MIPS provides a set of instructions that tells the processor what to do. Examples: add $t0, $t1, $t2 sub $t0, $t1, $t2 lw $t0, 0($s0) MIPS is a RISC architecture. What is RISC? RISC stands for Reduced Instruction Set Computer. It is a processor design approach that uses a relatively simple instruction set. Important characteristics: 1. Simple instructions. 2. Fixed-length instructions in standard MIPS32. 3. Large number of general-purpose registers. 4. Load/store architecture. 5. Instructions generally perform simple operations. What is CISC? CISC stands for Complex Instruction Set Computer. It uses instructions that can perform more complex operations. Example architecture: x86. Difference between RISC and CISC RISC CISC Reduced Instruction Set Computer Complex Instruction Set Computer Relatively simple instructions More complex instructions Often fixed-length instructions Variable-length instructions in x86 Load/store architecture Memory operands supported by many instructions Example: MIPS, RISC-V Example: x86 --- 2. Operations of Computer Hardware Computer hardware performs different operations to process data. The main categories include: A. Arithmetic Operations These perform mathematical calculations. Examples: Addition Subtraction Multiplication Division MIPS examples: add $t0, $t1, $t2 sub $t0, $t1, $t2 B. Logical Operations These perform operations on binary bits. Examples: AND OR XOR NOR Example: and $t0, $t1, $t2 C. Data Transfer Operations These move data between registers and memory. Examples: lw $t0, 0($s0) sw $t0, 0($s0) D. Control Operations These change the normal sequence of instruction execution. Examples: Branch Jump beq $t0, $t1, LABEL j LOOP