Question: Write a C program (Decode.c) that decodes an input machine code. Your program needs to be able to decode the R, I, and J type

Write a C program (Decode.c) that decodes an input machine code. Your program needs to be able to decode the R, I, and J type instructions listed below. We will only test the following instructions. When the program is started, your program will print Enter an instruction in machine code: and receive one 32-bit machine code from user. Then, the program will decode the machine code and print the information (type and values of individual fields of the instruction format) of the instruction. The followings are the example execution of the program. Your program must produce the following sample results in the exact same format.

Write a C program (Decode.c) that decodes an input machine code. Your

program needs to be able to decode the R, I, and J

That is all the information that was given to me.

CSE 140 Lab/HW#3 Due: in 2 weeks (see below) MIPS Decoder (80pts) Form a group of two members and do the following tasks. * Note that this programming assignment is closely related to the project so work with the team member who you want to do the project together. Write a C program (Decode.c) that decodes an input machine code. Your program needs to be able to decode the R. I, and I type instructions listed below. We will only test the following instructions. You can find these instructions from the first page of the MIPS Reference Data sheet (download from CatCourse). MIPS Reference Data 1 1 CORE INSTRUCTION SET OPCODE FOR /FUNCT NAME, MNEMONIC MAT OPERATION (in Vrilog) (Herr) Add R Rid] - RO-R[t] (1) 0/20 Add Immediate Rin] =Rs) SignExtmm Add mm. Unsigned IR-RES] + Sign Excm Add Unsigned R RIN] - RE-REO And R Rid) - R & Ritt 0/24 And Immediato IRR & ZeroExtimm Branch Onigal PC-PC Broch.Addr Branch On Net Equal if Rin]!R[) 141 ranch. Ale > Rmpdal (5) Jump And Link R3-PCIE: Rumpur Jump Rexister RRR Load Byto Unsigned 1 R-20h MIRI Sigal (7.011 (2) od talled -In HMIRIN Uasiged +Siyem(15:0) (2) Lood Linkod 11 I Rirt] - [R]SipnExt (2.7) 30 Lood Upper Imm I RR] - Simm 16"} Lood Wood 14 IRIX] MIRES+SignExt] nor R Rid) -- [R[t] Or R R[rd] R[R[) 0/25 Or Immediate IR-R) Zero (3) Sar Le Than R RI] - RCA] R[n]) 1:0 Salewa Than I. W1+ 1 IR-Rrum? 1:0(2) Am Set Less Than Imm. siliu ! RE) - (R$ SinElmm) Unsigned Set Less Than Uns su R Rird) - (R[rs) Rmpdal (5) Jump And Link R3-PCIE: Rumpur Jump Rexister RRR Load Byto Unsigned 1 R-20h MIRI Sigal (7.011 (2) od talled -In HMIRIN Uasiged +Siyem(15:0) (2) Lood Linkod 11 I Rirt] - [R]SipnExt (2.7) 30 Lood Upper Imm I RR] - Simm 16"} Lood Wood 14 IRIX] MIRES+SignExt] nor R Rid) -- [R[t] Or R R[rd] R[R[) 0/25 Or Immediate IR-R) Zero (3) Sar Le Than R RI] - RCA] R[n]) 1:0 Salewa Than I. W1+ 1 IR-Rrum? 1:0(2) Am Set Less Than Imm. siliu ! RE) - (R$ SinElmm) Unsigned Set Less Than Uns su R Rird) - (R[rs)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!