Docsity

MIPS Instruction Encoding and Logic Design Assignment, Cheat Sheet of Computer Science

Toggle sidebar
bg1
CDA3100 – Fall 2025
Assignment 3
Encoding Instructions and Logic Design 1
Objectives: (1) Learn how to encode and decode MIPS instructions; (2) Learn how to represent
hardware combinational logic in truth tables, logic equations, and logic blocks composed of gates,
and how to minimize logic using a Karnaugh map.
Put all answers on this sheet. Show your work (this is required for full credit and helpful for partial
credit). The assignment is due by 10/14/2025 at 11:59pm.
1. Encode the following instructions. To do so, (1) identify the instruction format that will be
used, (2) indicate the values of each of the fields for that format in decimal, (3) convert each of
these decimal values to binary, and (4) represent the entire instruction as one hexadecimal value.
On the last page is a list of a few instructions and their respective OP/funct values. (30 points)
(1) sub $t1,$a2,$s6
(2) lw $20, 64($10)
(3) j L2 # where L2 is at the decimal byte address 1,048,608
pf3
pf4
pf5

Partial preview of the text

Download MIPS Instruction Encoding and Logic Design Assignment and more Cheat Sheet Computer Science in PDF only on Docsity!

CDA3100 – Fall 2025 Assignment 3 Encoding Instructions and Logic Design 1 Objectives: (1) Learn how to encode and decode MIPS instructions; (2) Learn how to represent hardware combinational logic in truth tables, logic equations, and logic blocks composed of gates, and how to minimize logic using a Karnaugh map. Put all answers on this sheet. Show your work (this is required for full credit and helpful for partial credit). The assignment is due by 10 / 14 /2 025 at 11:59pm.

  1. Encode the following instructions. To do so, (1) identify the instruction format that will be used, (2) indicate the values of each of the fields for that format in decimal, (3) convert each of these decimal values to binary, and (4) represent the entire instruction as one hexadecimal value. On the last page is a list of a few instructions and their respective OP/funct values. ( 3 0 points) (1) sub $t1,$a2,$s 6 (2) lw $ 20 , 64($ 10 ) (3) j L2 # where L2 is at the decimal byte address 1,048,
  1. Decode the following instruction represented in hexadecimal. To do so, (1) convert the hexadecimal value to binary, (2) identify the opcode value and instruction format used, (3) determine the binary values of each of the fields for that instruction format, (4) convert each of these binary values to decimal, and (5) represent the entire instruction in MIPS assembly. On the last page is a list of a few instructions and their respective OP/funct values. (20 points) (1) 0x2a6c000c (2) 0x
  2. Design a circuit that has 3 inputs (X2, X1, and X0) and produces a single output (O). O is 1 if and only if X2X1X0 representing a 3-bit two’s complement value is in the range - 2, …, 1. a) Complete the following truth table. (10 points) Inputs Output X2 X1 X0 O 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
  1. For this question, use the following logic block: a) Write a logic equation to represent this logic block without any simplification. (10 points) b) Simplify the equation in part a) using the Karnaugh map. ( 5 points)

Instruction OP Code Funct div 0 26 sub 0 34 lw 35 - sw 43 - blez 6 - beq 4 - ori 13 - jal 3 - j 2 -