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.4, Problem 12QE
Program Plan Intro
Vole machine language:
- In vole machine language, the instructions are coded with specific meaning. The size of the instruction is 16 bits.
- The first hexadecimal digit shows the “op-code” of the instruction. The next three digits show the “operation” field of the register.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
A set of eight data bytes is stored in memory locations starting from XX70H. Write a program to add two bytes at a time and store the sum in the same memory locations, low order sum replacing the first byte and a carry replacing the second byte. If any pair does not generate a carry, the memory location of the second byte should be cleared.
Data(H) F9, 38, A7, 56,98,52, 8F, F2
In .assembly programming language, write a program that rotates the value in register A right by 1 bit. Rotating right is similar to shifting right, except that the excluded bit is inserted at the front
Write a MIPS assembly code program that asks the user to enter an unsigned number and read it. Then swap the bits at odd positions with those at even positions and display the resulting number. For example, if the user enters the number 9, which has binary representation of 1001, then bit 0 is swapped with bit 1, and bit 2 is swapped with bit 3, resulting in the binary number 0110. Thus, the program should display 6. Example of the MIPS assembly code I went the answer on MIPS Code only!!!!
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
- 3. Implement a 32-bit subtraction of two numbers X and Y that are stored in memory as: X = (DS: 503H) MS byte of MS word (DS: 0502H) (DS: 0501H) (DS: 0500H) LS byte of MS byte of LS byte of MS word LS word LS word Y = (DS:0507H) (DS: 0506H) (DS: 0505H) (DS: 0504H) The result of X - Y is to be saved in the place where X is stored in memory.arrow_forwardWrite a piece of code that copies the number inside AL (Only 8 bits) into whole edx, so that the value inside edx will be equal to the value inside the original AL. Example: Assume that Initially eax = 153BCF19h. When your code will end its running, edx will have Provide two different ways of accomplishing it. (a) (b)arrow_forwardA CPU that supports little endian format reads two integer (4-byte) values from address 0x1000 and 0x2000. The values read are 55 and 6850 respectively. Please show the memory contents (byte-wise) at address 0x1000 and 0x2000?arrow_forward
- Using MIPS assembly language, write a MIPS programs that the determines what the ECC code should be for a given number (an 8-bit byte).The codes you create are to work for 8-bit positive numbers as these are simpler to work with than larger numbers. The program is to request the user to enter a byte of data (a positive integer in the range of 0 to 255 in decimal) and then create the 12-bit Hamming code as described in your text (see above). The program is to then output this (with an appropriate label) in hex. Make certain that you have lots of comments in your code as this is in MIPS. Also make the code neat: line up the instruction columns, the register columns, and the comment fieldsarrow_forwardUsing MIPS assembly language, write a MIPS programs that the determines what the ECC code should be for a given number (an 8-bit byte).The codes you create are to work for 8-bit positive numbers as these are simpler to work with than larger numbers. The program is to request the user to enter a byte of data (a positive integer in the range of 0 to 255 in decimal) and then create the 12-bit Hamming code as described in your text (see above). The program is to then output this (with an appropriate label) in hex. the following code is not working and has errors: # Prompt user for inputli $v0, 4 # system call for printing stringla $a0, prompt # prompt stringsyscall # Read input byteli $v0, 5 # system call for reading integersyscallmove $t0, $v0 # store the byte in register $t0 # Calculate ECC Hamming codesrl $t1, $t0, 4 # extract the first 4 bitsxor $t1, $t1, $t0 # calculate parityand $t1, $t1, 0b1011 # mask out irrelevant bitssll $t1, $t1, 8 # shift left by 8 bitssrl…arrow_forwardAssignment for Computer Architecture! this is about hamming codes write the code IN MIPS ASSEMBLY LANGUAGE calculating hamming codes; The key to the Hamming Code is the use of extra parity bits to allow the identification of a single error. Create the code word as follows: Mark all bit positions that are powers of two as parity bits. (positions 1, 2, 4, 8, 16, 32, 64, etc.) All other bit positions are for the data to be encoded. (positions 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, etc.) Each parity bit calculates the parity for some of the bits in the code word. The position of the parity bit determines the sequence of bits that it alternately checks and skips.Position 1: check 1 bit, skip 1 bit, check 1 bit, skip 1 bit, etc. (1,3,5,7,9,11,13,15,...)Position 2: check 2 bits, skip 2 bits, check 2 bits, skip 2 bits, etc. (2,3,6,7,10,11,14,15,...)Position 4: check 4 bits, skip 4 bits, check 4 bits, skip 4 bits, etc. (4,5,6,7,12,13,14,15,20,21,22,23,...)Position 8: check 8 bits,…arrow_forward
- Write a program to multiply the contents of the PINC by 10 and store the lower byte at the RAM location 0x500 and the higher byte at PORTD LDI R16, OUT DDRC, R16 LDI R16, DDRD, R16 PINC R16, MUL R10, R16 STS Ox500 RO OUT PORTD. R1 Ox601 IN LDI R1 Ox00 OUT OXFF RO LDS MUL STS R16 10 R10arrow_forwardQ1\ 1- Write a program in assembly language for the 8085 microprocessor to send 10 bytes of data located at the memory address (3000h) using SOD at a baud rate of 1200. Information: The 8085 processor operates at a frequency of 3.072 MHz. And two high pulses must be sent before each byte (start bits) and one low pulse after each byte (end bits). You can use this flowchart, but you should notice that this flowchart deals with one byte, and you are required to deal with 10 bytes Transmit No Set up Character Bit Counter Send Start Bit Wait Bit Time Get Character in Accumulator Output Bit Using Do Wait Bit Time Rotate Next Bit in Do Decrement Bit Counter Is It Last Bit? Yes Add Parity if Necessary • Send Two Stop Bits Return (a)arrow_forwardAssume you are given an array of four 16-bit numbers stored in memory with a starting address x3110. Using PC- relative addressing, write an LC-3 machine language program that will copy the same four 16-bit numbers in reverse order, starting at memory address x3120. For example, if the following are the four 16-bit values stored in x3110, x3110 12 x3111 23 х3112 34 х3113 45 then the result of your program execution should write the following starting at memory address x3120: x3120 45 х3121 34 x3122 23 x3123 12 Load your program starting at address x3100. You will need to demonstrate the correct execution of your program by using the LC-3 Simulator.arrow_forward
- Please write the code in MIPS assembly Language Create a MIPS program that corrects bad data using Hamming codes. ECC Hamming codes are explained on pages 420-424 in your text. The program is to request the user to enter a 12-bit Hamming code and determine if it is correct or not. If correct, it is to display a message to that effect. If incorrect, it is to display a message saying it was incorrect and what the correct data is (the 12-bit Hamming code) again in hex. I will be testing only with single bit errors, so the program should be able to correct my tests just fine. You do not need to worry about multiple bit errors. Make certain that you have lots of comments in your code as this is in MIPS. Also make the code neat: line up the command field, the register fields, and the comment fields For this assignment, turn in your code, a screenshot showing a working test casearrow_forwardA set of 10 readings is stored in memory locations starting at XX50H. The readings are expected to be positive. Write a program to i check each reading to determine whether it is positive or negative ii. reject all negative readings iii add all positive readings iv. store FF H in the memory location XX80 H when the sum exceeds 8 bits otherwise store the actual sum at XX80 H.arrow_forward2) Write a program that finds the position of the first 1 in an 8-bit data item. The data is scanned from D0 to D7. Write the result into 0x30. For example, if the data is equal to 11110000, then the program should write 0x04 into address 0x30.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