Question: Help with Java, need to complete missing partsPROBLEM The Motorola 6 8 0 0 0 family of CPUs is a Complex Instruction Set Computer (
Help with Java, need to complete missing partsPROBLEM
The Motorola family of CPUs is a Complex Instruction Set Computer CISC; ie there
are many formats, lengths, etc. We will consider only four instructions with a single addressing
mode. An instruction in assembly language is written like
ADD.W DD
That instruction says to add a "word" bit value from data register to the value in data
register In machine language, the instruction looks like
Binary
Hex
D
The format of the instructions that we will consider is
where s is the size of the data
and and are register numbers
ASSIGNMENT
You will be given a Java application with a graphical user interface that allows a user to encode
and decode M instructions. The user will enter a four digit hex number or digit binary
number and request that it be decoded into assembly language or enter an assembly language
instruction and request that it be encoded into hex and binary representations. You must write the
code for the methods encode decodeBin and decodeHex which are called from the
actionPerformed method when a button is pressed. Your program needs to encodedecode only
the four instructions shown above.
Display an error message if the input cannot be encodeddecoded
Your program must check for all possible errors.
NOTE: This lab is intended to give you experience in using bitwise operators. You must
encodedecode the machine instruction as a short or an int and convert to a String only for
display. Do not use a String to manipulate the machine language instruction. You may use a
String to manipulate assembly language instruction.
Use the code in the file "Labjava". Do not change any of that code. You should only fill in
the three methods at the end.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
