ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 04 May 2017 My Price 9.00

language and computer organization

Questions about assembly language and computer organization. Detail is in the file.  Please give  detailed process of answers.

 

 

1. Briefly discuss the differences between translating a program and interpreting it (assume that the program is
written in language L1 and that you want to execute it on a computer that can only understand programs
written in its machine language L0). 2. Convert the following numbers from binary to hexadecimal (Learn more):
a. 1100 0110 1101 0110
b. 1011 1001 1010 1011
c. 1101 1110 1001 0001
Note: Every row is a 16-bit binary number. 3. Represent the following decimal numbers in 8-bit 2’s complement numbers:
(a) -120 (b) -24 (c) 24 4. Compute the results of the following operations with 8-bit 2’s complement numbers:
(a) 00110110 + 01001111 (b) 01000000 - 11100000 (c) 01110100 + 01010001
5. Fill in the truth table below for the boolean function implemented by the transistor circuit shown above. Explain
how you obtained it (i.e. for each input value combination for A and B, which transistors are on and which ones
are off, which input becomes the final output (C), etc.). 1 A B 0 0 0 1 1 0 1 1 C (output) 6. Assume that A and B are 32 bits wide. Write the result stored in B after each one of these operations (for each
line, assume B has the value assigned to it by the previous operation). Write your results using hexadecimal
notation. Initial value of A is 0x12345678. (Learn more).
a.
b.
c.
d. B = A XOR 0xAAAAAAAA
B = B AND 0x98765432
B = B OR A
B = NOT B
Note: Hexadecimal numbers are usually prefixed with “0x”. You can just ignore it and treat 0xABCD as
ABCD which is equal to 1010 1011 1100 1101 in binary. 7. Write a piece of x86 assembly code that counts number of 1s in the binary representation of the value stored in
eax and saves the result in edx. 8. Assume a computer that has 16 8-bit registers, 64kB byte-addressable memory (meaning that each byte has a
unique address) and can perform 128 distinct operations. Given the following register-memory instruction
format:
OP REG MEM
2 how many bits are needed to properly express such an instruction?
Note: OP stands for the code of the operation to be performed, REG stands for the index of the register
to be used and MEM stands for the address of the 8-bit memory words to be used. 9. For the Boolean function: a. Fill in its truth table below: X Y Z F b. Build a circuit that implements the function. Use 2-input AND, 2-input OR and NOT gates only. 10. What is the equivalent Boolean expression for this circuit? 3 11. Convert the following C code snippet to x86 assembly.
While ( c > 0 ) {
if ( a == b ) {
b = 5 * b;
}
else if ( a > b ) {
a = a - b;
}
c--;
} 4

Attachments:

Answers

(11)
Status NEW Posted 04 May 2017 04:05 AM My Price 9.00

-----------

Not Rated(0)