Differentiate between machine code, low level language (assembly), and high level language (c)
Note:if you satisfied with my answer and explanation plzzz do like and thank you.
Differentiate between machine code, low level language (assembly), and high level language (c)
using Ax register convert this high-level language expression to Assembly language code - C=C+4 - C=C-1
Exercise 1: For each of the following high-level language code snippets, write the SRO assembly code. Assume that the variables A, B, C, X. are in memory locations MA, MB, MC, MX, respectively. a) XA+ 2B- 4C; b) if (A <0) else if (A> 0) else c) for (int i 1; 10; i++) X A+B+C (Hint: Use branch instructions to set up the loop)
Translate the High order language program to assembly language and generate PEP9 assembly language code. #include <stdio.h> int main() { int number; scanf(“%d”,&number ); if (number <0) { number =- number; } printf ("%d", number); return0; }
For exercises 3 through 5: .Convert the given high level language pseudocode into MIPS assembly * Use proper indentation for code blocks within conditional statements and loops Comment each assembly instruction to indicate the high-level language operation it is performing: .Use MARS to verify correct operation of your program
Question 26 Write Hack Assembly Language that will implement the following Hack Virtual Machine commands: Virtual Machine Code a) push constant 0 Assembly Language Code [5 marks] b) pop local 1 6 marks c) push argument 56 [10 marks] Total for Question 26: 21 marks] Question 26 Write Hack Assembly Language that will implement the following Hack Virtual Machine commands: Virtual Machine Code a) push constant 0 Assembly Language Code [5 marks] b) pop local 1 6 marks c) push...
3. [40 points, level-2,-3, and-4] this question involves Level-4 “High language level", Level-3 "Machine language level (ISA)", and Level-2 "Microprogramming level". Use the table on next page to answer the following four questions. (a) [10 points] Translate/Java the C++ code segment (I" column in the table below, Level-4) into Mie- I LJVM machine language (2nd column, Level-3), assuming i, j, and k are the 1st, the 2nd and the 3rd local variables, respectively (b) [10 points) Translate the code in...
Which one of the following statements is FALSE? Pseudocode is a high-level programming language. C++ and Java are 3GLs – procedural languages. SQL is 4GL – non-procedural language. Assembly language is 2GL – low level language. 5GLs are much closer to natural languages.
Problem-1 (9 Points) Determine the machine code (in hex) for the following assembly language instructions: Machine Code (in Hex) Instruction a. LDX #$21B6 b. LDAB $1B,Y C. STAB $B34C
Write a sequence of normal assembly language instructions corresponding to the following sequence of high-level language statements. Assume that each variable (A, B. C, and D) is one word in memory. If notequalto B then C: =5; else C: =10; D: =50;
What is the machine code that corresponds to the AVR Assembly Language Instruction and r31, rO Enter your answer as a 16 bit binary number. There must be no spaces or punctuation marks - just enter sixteen 1's or O's.) What is the machine code that corresponds to the AVR Assembly Language Instruction and r31, rO Enter your answer as a 16 bit binary number. There must be no spaces or punctuation marks - just enter sixteen 1's or O's.)