Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875460
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 2, Problem 33CRP
a.
Program Plan Intro
Program plan:
- LOAD the bit pattern in memory location “0x44” to a register.
- STORE the value in the register to a memory location “0xAA”.
- HALT the program.
b.
Program Plan Intro
Program plan:
- LOAD the content of memory location “0x34” into a register.
- LOAD the memory location “0xF0” to another register.
- AND the bit pattern of registers, store the result in another register.
- STORE back the value of AND operation to memory location “0x34”.
- HALT the program.
c.
Program Plan Intro
Program plan:
- LOAD the content of memory location “0xA5” into a register “2”.
- LOAD the memory location “0x0F” to another register “3”.
- AND the bit patterns of registers, store the result in register “4”.
- LOAD the content of memory location “0xA6” into a register “5”.
- LOAD the memory location “0xF0” to register “6”.
- AND the bit patterns of register “5” and “6”, store the result in register “7”.
- OR the bit patterns of register “7” and “4”, store the result in register “8”.
- STORE back the value OR operation to memory location “0xA6”.
- HALT the program.
d.
Program Plan Intro
Program plan:
- LOAD the content of memory location “0xA5” into a register “2”.
- LOAD the memory location “0x0F” to another register “3”.
- AND the bit patterns of registers, store the result in register “4”.
- LOAD the memory location “0xF0” to register “5”.
- AND the bit patterns of register “2” and “5”, store the result in register “6”.
- ROTATE the bit pattern in register “6” through four times.
- OR the bit patterns of register “6” and “4”, store the result in register “7”.
- STORE back the value OR operation to memory location “0xA5”.
- HALT the program.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Don't give wrong answer.
Write a program that will:
a. Create an array of bytes containing the values: 12h, 34h, 56h, 78h, 9Ah, BCh, DEh, F0h
b. Loop over the array and compute the sum in the EAX register. Note: the array contains bytes and you convert the bytes in the array to a 32-bit value before performing the sum.
c. Show the contents of the EAX and ECX register at each iteration of the loop.
Create an unsigned 16-bit number that stores the value 13330 (decimal). Show what the memory contains and work verifying the result.
Create a signed 16-bit number and store the value -32 (decimal). Show what the memory contains and work verifying the result.
Chapter 2 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Ch. 2.1 - What sequence of events do you think would be...Ch. 2.1 - What information must the CPU supply to the main...Ch. 2.1 - Prob. 3QECh. 2.2 - Prob. 1QECh. 2.2 - In the text, JUMP instructions were expressed by...Ch. 2.2 - Is the instruction If 0 equals 0, then jump to...Ch. 2.2 - Write the example program in Figure 2.7 in actual...Ch. 2.2 - The following are instructions written in Vole...Ch. 2.2 - What is the difference between the instructions...Ch. 2.2 - Here are some instructions in English. Translate...
Ch. 2.3 - Prob. 1QECh. 2.3 - Suppose the Vole memory cells at addresses 0xB0 to...Ch. 2.3 - Suppose the Vole memory cells at addresses 0xA4 to...Ch. 2.3 - Suppose the Vole memory cells at addresses 0xF0 to...Ch. 2.4 - Prob. 1QECh. 2.4 - Prob. 2QECh. 2.4 - Prob. 3QECh. 2.4 - a. Suppose you XOR the first 2 bits of a string of...Ch. 2.4 - Prob. 5QECh. 2.4 - Prob. 6QECh. 2.4 - Prob. 7QECh. 2.4 - Prob. 8QECh. 2.4 - Prob. 9QECh. 2.4 - Prob. 10QECh. 2.4 - Using Vole machine language (Appendix C), write a...Ch. 2.4 - Prob. 12QECh. 2.5 - Prob. 1QECh. 2.5 - Prob. 2QECh. 2.5 - Prob. 3QECh. 2.6 - The hypotenuse example script truncates the sides...Ch. 2.6 - Prob. 2QECh. 2.6 - The Python built-in function str () will convert a...Ch. 2.6 - Use the Python built-in bin () to write a script...Ch. 2.6 - Prob. 6QECh. 2.7 - Referring back to Questions 3 of Section 2.3, if...Ch. 2.7 - Prob. 2QECh. 2.7 - Suppose there were two central processing units...Ch. 2 - a. In what way are general-purpose registers and...Ch. 2 - Answer the following questions in Vole machine...Ch. 2 - Prob. 3CRPCh. 2 - What is the value of the program counter in the...Ch. 2 - Prob. 5CRPCh. 2 - Prob. 6CRPCh. 2 - Prob. 7CRPCh. 2 - Suppose a machine language is designed with an...Ch. 2 - Translate the following instructions from English...Ch. 2 - Rewrite the program in Figure 2.7 assuming that...Ch. 2 - Classify each of the following Vole instructions...Ch. 2 - Prob. 12CRPCh. 2 - Prob. 13CRPCh. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Prob. 18CRPCh. 2 - If the Vole executes an instruction every...Ch. 2 - Prob. 20CRPCh. 2 - Prob. 21CRPCh. 2 - Prob. 22CRPCh. 2 - Prob. 23CRPCh. 2 - Write a program in Vole to compute the sum of...Ch. 2 - Prob. 26CRPCh. 2 - Prob. 27CRPCh. 2 - Suppose the following program, written in Vole, is...Ch. 2 - Summarize the steps involved when the Vole...Ch. 2 - Summarize the steps involved when the Vole...Ch. 2 - Summarize the steps involved when the Vole...Ch. 2 - Suppose the registers 0x4 and 0x5 in the Vole...Ch. 2 - Prob. 33CRPCh. 2 - Prob. 34CRPCh. 2 - Prob. 35CRPCh. 2 - Prob. 36CRPCh. 2 - Prob. 37CRPCh. 2 - Prob. 38CRPCh. 2 - Prob. 39CRPCh. 2 - Prob. 40CRPCh. 2 - Prob. 41CRPCh. 2 - Prob. 42CRPCh. 2 - a. What single instruction in the Vole machine...Ch. 2 - Write a Vole program that reverses the contents of...Ch. 2 - Write a Vole program that subtracts the value...Ch. 2 - Prob. 46CRPCh. 2 - Suppose a person is typing forty words per minute...Ch. 2 - Prob. 48CRPCh. 2 - Suppose the Vole communicates with a printer using...Ch. 2 - Write a Vole program that places 0s in all the...Ch. 2 - Prob. 51CRPCh. 2 - Prob. 52CRPCh. 2 - Suppose you are given 32 processors, each capable...Ch. 2 - Prob. 54CRPCh. 2 - Prob. 55CRPCh. 2 - Describe how the average of a collection of...Ch. 2 - Write and test a Python script that reads in a...Ch. 2 - Write and test a Python script that reads in a...Ch. 2 - Prob. 59CRPCh. 2 - Suppose a computer manufacturer develops a new...Ch. 2 - Prob. 2SICh. 2 - Prob. 3SICh. 2 - Prob. 4SICh. 2 - Suppose a manufacturer produces a computer chip...Ch. 2 - Prob. 6SICh. 2 - Prob. 7SICh. 2 - Prob. 8SI
Knowledge Booster
Similar questions
- Write a sequence of instructions that shift three memory bytes to the right by 1 bit position.Use the following test data:byteArray BYTE 81h,20h,33harrow_forwardGiven the following decimal numbers, convert the numbers to a 16-bit memory location in binary using two's complement. (show all details step by step) 165910 - 165910 954610 - 954610 Convert the following decimal numbers to binary using the two’s complement format, using 8 bits: 4810 -3910 -28410 010 Briefly explain why two’s complement is the best format for representing signed integers in a computer. 4. Convert the following decimal numbers to binary floating-point representation, using 4 bits for the fractional part: 68.510 125.4410 99.9910 give the answer of everything otherwise dont give. pleasearrow_forwardAssume th at we have a computer with a cache memory of 512 blocks with a total size of 128K bits. Knowing that the computer uses a word addressable mode and the format of the memory address as seen by the Fully associative cache scheme is as shown below, an swer the below question s: Fully Associative Cache Format 19 1- How many words do we have in each cache block? 2- What is the size of each word? 3- What is the size of the main memory? 4- How many blocks are there in the main memory? 5- Draw the format of the memory address as seen by the Direct Mapped Cache scheme, showing the fields as well as their sizes.arrow_forward
- Calculate the parity of a byte with the value 31ten and show the pattern stored to memory. Assume the parity bit is on the right. Suppose the most signifi cant bit was inverted in memory, and then you read it back. Did you detect the error? What happens if the two most signifi cant bits are inverted?arrow_forwardCreate a MIPS programme that calculates the Hamming ECC code for an 8-bit byte. 8-bit positive numbers are easier to work with than larger ones, so your codes function for them. The programme requests a byte of data (a positive number from 0 to 255 in decimal) and creates the 12-bit Hamming code. The programme then outputs hex with a label.arrow_forwardAssume that a mad scientist designed a new floating point binary format. In his design, he assigned 1 bit for sign, 10 bits for Exponent, 18 bits for fractions. Sign (1bit) Exponent (10 bit) Fraction (18 bit) Now, assume that you want to store -0.076 into this format. Convert -0.076 into above binary floating point format. For fraction part only compute 7 places after the point. (e.g. 0.1001111) To receive full points in this question, show all the detail computation. Paragraph 三Y= Addarrow_forward
- Answer using the assembly language.arrow_forwardMicroprocessor and Microcontrollers. Kindly give full write up solution of this question.arrow_forwardComplete the table below to show the numerical results from applying the indicated operation code to the data shown. Opcodes are six-bit numbers defined as shown below. R = 1 for Rotate 0 for Shift; D = 1 for Right 0 for Left; F is fill, and A2-A0 define the number of bits. R D F A2 A1 A0 Input(Base10) Input(Base2/8-bit) OpCode Output(Base10) Output(Base2/8-bit)) 47 00101111 110011 229 11100101 80 110111 17 011001 123 100011arrow_forward
- The first two bytes of a 2M x 16 main memory have the following hex values:Byte 0 is FEByte 1 is 01If these bytes hold a 16-bit two's complement integer, what is its actual decimal value if:a. memory is big endian?b. memory is little endian?arrow_forwardWrite an ASM program that evaluates the following expression, using variables:Z = (-A - B) - (-C - D) 1. Declare and initialize the memory variable A to 32-bit signed integer value 543210and variable B to 16-bit signed integer value -3210.2. Declare the memory variables C and D and read in their values from the keyboardas 32-bit signed integer value 43210 and 8-bit signed integer values -10,respectively.a. You should display a message asking for the value of the variable, forexample: “What is the value of C?” thenb. Read in the value of C from the keyboard and thenc. Display the value you have read beside (ie, to the right of) the message“What is the value of C?”. Then repeat for variable D in the next line.3. Variable Z should be declared as a 32-bit signed integer.4. Display the string “Z = (-A - B) - (-C - D)” alone in a single line.5. Display the values of all the variables A, B, C, D together in the next line (in theorder in which they appear in the expression); each separated by…arrow_forwardFor a computer that uses 9-bit word size and Signed Magnitude (SM) arithmetic to represent numbers, showhow this computer will perform the addition of the two decimal numbers (-129) and (-171). You should: a. Find the equivalent SM values of (-129) and (-171). b. Show how this computer will perform the addition of the two numbers. c. Read the result in SM to its equivalent in decimal and state whether the result is correct or not.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education