Question

1) State the steps that the SUBB instruction will go through when subtracting 23H – 12H...

1) State the steps that the SUBB instruction will go through when subtracting 23H – 12H

2) Show the code required to perform 77 x 34 and then show the code required to perform 77 divided by 3

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1)CLR C    ;make CY=0 as here we are not using borrow.

MOV A,#23H ;load 23H into accumulator.

MOV R3,#12H ;load 12H into R3.

SUBB A,R3 ;subtract 23H from 12H.

Steps followed in subtraction:

in microprocessor like 8051 subb is performed by 2's compliment method instead of having a separate subtracter circuit it will use the adder circuit so 2's compliment method is inculcated prior to simple subtraction CY flag is made 0 and so we can summarize as take 2s compliment of subtrahend here 12 and add it to A here 23 and then invert the carry provided that address mode is must and should supported.

2)Below is the code for multiplication

MOV A,#4DH ;hexadecimal of 77 is 4D and load this value into A.

MOV B,#03H ;Load 3 into B.

MUL AB ;multiply 77 and 3 and lower significant bits are stored in A and if exceeds upper significant bits are stored in B

Below is the code for division

MOV A,#4DH ;hexadecimal of 77 is 4D and load this value into A.

MOV B,#03H ;Load 3 into B.

DIV AB ;divide 77 and 3 quotient is in A and remainder is in B.

Add a comment
Know the answer?
Add Answer to:
1) State the steps that the SUBB instruction will go through when subtracting 23H – 12H...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please help with 1 & 2 A. Go through the steps of listing and labeling reactive...

    Please help with 1 & 2 A. Go through the steps of listing and labeling reactive features and analyzing the reaction between nucleophile and electrophile and resolving each reactive situation leading to the final product formation. Show stereochemistry if appropriate and relative amounts of products. (Z)-pent-2-ene with HBr 3-methylbut-1-ene with HBr and trace amounts of H2O2

  • List and Describe the steps that you would go through when redesigning your organisation's structure

    List and Describe the steps that you would go through when redesigning your organisation's structure

  • Could you go through the steps in more detail? I am getting confused with the steps....

    Could you go through the steps in more detail? I am getting confused with the steps. Chapter 5. Function of Random Variables 14 Example 2. The probability density function of X is given by the Uniform distribution in (0, 1): 0 1 1 fx (x) otherwise Find the distribution of Y = eX Solution: Let Y = eX. Therefore, = P (e* < y) = P(X < logy) Fx(logy) Fy(y) P(Y logy logy = |x (r) dr - d logy...

  • Consider a finite state machine with a control input called mode. When mode = 0, the...

    Consider a finite state machine with a control input called mode. When mode = 0, the machine operates as a mod-3 down counter, where the outputs are the count values. When mode = 1, the machine's output progresses through 1133 number (1 digit per clock cycle). Complete each of the steps which follow. (a) Draw the state diagram for this machine. (b) Write RTL Verilog code which implements this design. Submit your printed source code by the due date and...

  • Assume the MIPS instruction subset is redefinied to contain only the following instructions: 1. Assume that...

    Assume the MIPS instruction subset is redefinied to contain only the following instructions: 1. Assume that our MIPS instruction subset is redefined to contain only the following instructions: Instruction Instruction fetch Register read & ALU operation Data Memory Register write decode 0 ns R-format 2ns 1 ns lw ns l ns 2 ns 5 ns 1 ns ns 1 ns ns 0 0 bne The table lists the times required for each step within each instruction. Recall that with the...

  • #2 can you please go through the steps of how you got this Consider the simple...

    #2 can you please go through the steps of how you got this Consider the simple linear regression model yi-Xißl + β0 + Ei, where the errors €1, €n are i.i.d. random variables with E[c]-0, var(G) σ2, i 1, , n. Solve either one of the questions below. 1. Let h be the least squares estimator for β1- Show that Bi is the best linear unbiased estimator for β1. (Note: you can read the proof in wikipedia, but you cannot...

  • Show steps Supply air for a building is heated from State 1 to State 2 by...

    Show steps Supply air for a building is heated from State 1 to State 2 by an electric heater. Given the conditions below determine the following -Given Values- Dry Bulb: T1 (F) 42 Relative Humidity: Phi1(%)-50% Mass flow rate of air: ma1 (lbah) 2094 Dry Bulb: T2 (F) 73 a) Determine the specific volume of the air (ftA3lba) at State 1. b) Determine the dew point temperature (F) for State 1 c) Determine the wet bulb temperature (F) for State...

  • (A) What is the velocity of a beam of electrons that go undeflected when passing through...

    (A) What is the velocity of a beam of electrons that go undeflected when passing through crossed electric and magnetic fields of magnitude 1.39x104 V/m and 2.92x10-3 T, respectively? (B) The magnetic field in a cyclotron is 0.1 T. What must the minimum radius of the dees be in metres, if a proton beam is to be produced with a maximum speed of 1×107 m/s? (C) The beam of electrons goes undeflected when passing through crossed electric and magnetic fields...

  • Instruction: In this assignment, you are required to perform two tasks- (1) Test the hypotheses in...

    Instruction: In this assignment, you are required to perform two tasks- (1) Test the hypotheses in the two-way ANOVA manually. Here, show all the necessary steps and compute effect sizes and run post hoc (when necessary). (2) Using the same data, run the analyses using SPSS. Here, first copy and paste the output tables into word document and then report the important results in the standard ANOVA summary table and interpret the results. Include effect sizes and plots. 1. A...

  • please solve the question completely and show the steps ... thumb up will be given 1....

    please solve the question completely and show the steps ... thumb up will be given 1. (3 points each) [CO: 11 a. Perform the number conversion (2101)s -6 binary equivalent of the Gray code numbers listed below in ascending order, ie, b. List all 4-bit from smallest to largest. (Hint: Use the mirroring technique.) Gray-Code Straight Binary Equivalent 0001 0011 0010 0110 0111 0101 0100 1100 1101 Perform the following binary multiplication: c. (1031)4 (1031)4 Perform the following base-3 addition:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT