Question: a) The 8-bit instruction format is given as shown in figure 1.2 below. B-bit Instruction format 7 6 3 2 1 0 1 Op-code Operand

a) The 8-bit instruction format is given as shown in figure 1.2 below. B-bit Instruction format 7 6 3 2 1 0 1 Op-code Operand 000 = LDA 001 - STA Addressing mode 010 - ADD 0 = Absolute 011 - BRA 1 = Literal (Immediate) 100 = BEQ 111 = STOP Figure 1.2 Format of an 8-bit Instruction Write program to display each fields separately in the form of binary for a given 8 bit number entered by user. For an example: User enter 18510 = 1011 10012 Op-Code = 1012 Addressign Mode = 12 Operand = 10012 Write a function for the above program which can be called inside the main. (20 marks) b) Write a function which receives a float and an int from main(), finds the product of these two and returns the product which is printed through main(). (5 marks) c) Write a C function to evaluate the series sin(x) = = x - (x 3/3!) + (x 5/5!) - (x 7/7!) + ..... to five significant digits
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
