Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I NEED LOGISM FILES PLEASE. Please share screenshots of the 9 original instrunctions of the logism file. I have the instrunctions but need to submit

I NEED LOGISM FILES PLEASE. Please share screenshots of the 9 original instrunctions of the logism file. I have the instrunctions but need to submit the images. Here are the instructions. Phase 1:
Arithmetic Addition: Adds two 8-bit operands and provides the sum as an output. Important for general computation
Increment: Increments the value of a register by 1.Helps with loops.
Decrement: Decrements the value of a register by 1. Also important for loops.
Comparison: Compares two operands and provides three outputs which indicates equal, less than, and greater than. Important for conditional branching.
Logic Bitwise NOT: Performs a bitwise NOT operation on an operand. Useful for logical manipulation of data.
Logic Bitwise AND: Performs a bitwise AND operation between two operands. Useful for masking and filtering bits.
Logic Bitwise OR: Performs a bitwise OR operation between two operands. Useful for combining and setting bits.
Register Right Logic Shift: Shifts the bits of a register to the right. Important for division by powers of 2 and bit manipulation.
Register Left Logic Shift: Shifts the bits of a register to the left. Useful for multiplication by powers.
Additional Instructions
Load Immediate: Loads an immediate value into a register. Important for registers with constants.
Store: Stores the value of a register into memory. Needed for transferring data between memory.
Load: Loads the value from memory into a register. Needed for retrieving data from memory for processing.
Bitwise XOR: Performs a bitwise XOR operation between two operands. Useful for data manipulation.
Clear: Sets all bits in a register to zero. Important for resetting registers.
Phase Two:
Opcode Table:
Arithmetic Addition: Opcode 0000
Increment: Opcode 0001
Decrement: Opcode 0010
Comparison: Opcode 0011
Logic Bitwise NOT: Opcode 0100
Logic Bitwise AND: Opcode 0101
Logic Bitwise OR: Opcode 0110
Register Right Logic Shift: Opcode 0111
Register Left Logic Shift: Opcode 1000
Load Immediate: Opcode 1001
Store: Opcode 1010
Load: Opcode 1011
Bitwise XOR: Opcode 1100
Clear: Opcode 1101
Number of Operands: 1 operand with accumulator
Phase Four:
Program 1: Add Two Operands
LOAD R1, Operand1 ; Load the first operand into register R1
LOAD R2, Operand2 ; Load the second operand into register R2
ADD R1, R2, R3 ; Add the contents of R1 and R2, store the result in R3
; Result is now in R3
Program 2: Add Operands Until the New Value is 0
LOAD R1, Operand1 ; Load the initial operand into register R1
CLEAR R2 ; Clear register R2 to store the sum
LOOP:
ADD R2, R1, R2 ; Add R1 to R2 and store the result in R2
CJMP R1, R2, END ; Conditional jump to END if R1 equals R2
JMP LOOP ; Unconditional jump back to LOOP
END:
; Result is in R2
Program 3: Increment by 2 Ten Times
CLEAR R1 ; Clear register R1
LOADIMM R2,2 ; Load immediate value 2 into register R2
LOOP:
ADD R1, R2, R1 ; Increment R1 by 2
CJMP R2, R1, END ; Conditional jump to END if R2 equals R1
JMP LOOP ; Unconditional jump back to LOOP
END:
; Result is in R1
Program 4: Shift Register Until Least Significant Bit is 0(with Stop Condition)
LOADIMM R1,1 ; Load immediate value 1 into register R1
LOADIMM R2,0xFE ; Load immediate value 0xFE into register R2(LSB is 0)
LOOP:
LEFTSHIFT R1, R1 ; Left shift R1 by 1
CJMP R1, R2, END ; Conditional jump to END if R1 equals R2(LSB is 0)
JMP LOOP ; Unconditional jump back to LOOP
END:
; Result is in R1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

work settings of recent graduates;

Answered: 1 week ago