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
Concept explainers
Textbook Question
Chapter 2, Problem 50CRP
Write a Vole
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Solve this in Emulator 8086 in assembly language.
Q1\
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)
Write an assembly program that calculates a special sum that behaves as follows:
• It requests a positive integer number from the user having any value between 1 and 255. • Once it gets the user input, it sums all the numbers that are equal or less than the
user input and that are divisible by 3.
As an example, if a user runs the assembly program and provides the value 25 as input, the display should show the following:
special sum = 24 +21+ 18+15+12+9+6+3=108
As a programmer, you need to check on the input provided by the user and make sure it is valid (e.g. whether user input is positive and the input is a number, etc). Make sure that you have comments explaining the purpose of your instructions and what you are trying to achieve using it.
Please submit a file that contains the code and screenshots of the execution of different numbers. Provide five runs: test the program with 54 and 71 and provide additional three runs of your choice (five runs in total). Provide also the code
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
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Describe two properties that each candidate key must satisfy.
Modern Database Management (12th Edition)
What is primary difference between an abstract class and a regular class?
Starting out with Visual C# (4th Edition)
What Ada construct provides support for abstract data types?
Concepts of Programming Languages (11th Edition)
What is denormalization?
Database Concepts (7th Edition)
Which file open flag causes all output to take place at the end of the file?
Starting Out with C++: Early Objects (9th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- You are asked to write two programs in Hack assembly language. You should use the stock 16-bit Hack machine in this project, running on the CPU emulator. 1). a program called divplusone.asm. The inputs of this program are the current values stored in R0 and R1 (i.e. the first two RAM locations). The program adds 1 to the value in R1 and then computes the quotient (i.e. how many whole times R1 + 1 goes into R0) and the remainder (how many are left over), leaving them in R3 and R4 respectively. You may assume, without checking, that R0 and R1 are positive numbers.arrow_forward5. Write an assembly language program that inputs the number of a student from the keyboard and after the entry, it displays the number at the centre of the text screen in vertical manner. For example, if you enter your student number as 87138 it will be displayed at the centre of the monitor in the following way: 8 7 1 3 8 Hints: INT 21H, AH= 0AH inputs a string of data from the keyboard. The interrupt requires that the offset address of the buffer is in DX. INT 21H, AH= 02 outputs a character to the monitor and assumes the character in DL (ASCII). INT 10H, AH= 02 sets cursor location and assumes row in DH and column in DL.arrow_forwardWrite a program that can create a ‘short address' from a longer one. The program should be able to receivean address that has a fixed format but is of arbitrary length, and convert that to a specified shorter format.All input addresses will have the following format: address-line-1, address-line-2, ..., address-line-n, postcodeNote that there is a space character after each comma.All postcodes will have the following format:adddaa.Where a is an alphabetic character and d is a digit.For example, the address 56 Clapham Gardens, Stoke Newington, London, N145PX has the given format.As does 3 Acacia Ave, E178PU.The short address that your program generates must have the following format:address-line-1 postcodeNote that there is no comma in this string but there is a space between address-line-1 and postcode.For the examples above, the short addresses would be:56 Clapham Gardens N145PX and 3 Acacia Ave E178PU.Your class must contain the following method:public String…arrow_forward
- Write a program to store six bytes of data in the memory location 0600h. Find the average of the data stored. Store the result in 0620h. (Execute the program in EMU 8086 and upload the output screenshot in the link below)arrow_forwardUsing emu8086 write a full code that does the following - write your name in the middle of the screen - using the keyboard arrow keys, the user can move a blinking cursor on the screen - when the cursor is over a character, if the user hits "enter" then the character will move with the cursor - when "enter" is clicked again, the character is released to the new position -characters cannot be released on top of each other - when a character is moving with the cursor, if user click"R" the character is colored red, "B" for blue, and "G" for greenarrow_forwardWrite 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!!!!arrow_forward
- In Assembly Programming Language, define x and y as 16-bit unsigned integer variables. Assume that x and y hold values small enough to fit into 8 bits. Write a program that computes (x2 - y2). If the result fits into 8 bits then save it in the most significant byte of x, otherwise save it to a 16-bit variable z.arrow_forward1. Draw a flowchart for a program that reads a value from memory at an address labeled Info1, multiplies it by three, adds one if and only if the result of the multiplication is odd, then (regardless of if it's odd or even) stores it back to a memory address labeled Info2. (Ask yourself: is there a simple check I can do to see if a binary value is odd or even?) 2. Convert the flowchart provided below to lines of code (one line per box in the chart) to write a program that does the following tasks four times: reads a one-byte value from an array that starts at the label Info3, adds seven to it, then stores it back to the address from which it was read. Note that you should be reading from a different address each time through the loop as you index through the array.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
- MIPS Assembly Write a program for RISC MIPS 32bits that challenges a person to guess a number of up to 3 digits before and 3 digits after the comma, that is, a value between 000,000 and 999,999. The program user will try to guess the number with multiple attempts, where the program will indicate at each attempt if the informed number is bigger, smaller, or if the user guessed correctly. When this happens, the program ends, showing a SUCCESS message and a total count of the number of attempts taken to get it right. The program must have a SUBROUTINE as described below. SUBROUTINE:- Input Parameters: user guess, expected value- Output: message on screen (bigger, smaller, SUCCESS)- Returns: value 1 if correct, 0 if incorrectarrow_forwardBelow C-code has a for loop which will repeat 1000 times of the operation. This code will be running on very simple machine. Change the code to reduce the number of branch instructions. You can have up to 5 lines (statements) within the for loop. What is the number of branch operations before and after? for (i=0; i<1000; i++){ y[i] = w * x[i] + b[i]; }arrow_forwardWrite an ALP to generate a bill for 6 items purchased in a LULU hypermarketwhose prices are represented as BCD numbers 12h ,14h,18h,22h and 35h and 42hOMR. Save the bill amount in the memory address 8500harrow_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
Computer Fundamentals - Basics for Beginners; Author: Geek's Lesson;https://www.youtube.com/watch?v=eEo_aacpwCw;License: Standard YouTube License, CC-BY