Computer Science: An Overview (12th Edition)
12th Edition
ISBN: 9780133760064
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 2, Problem 32CRP
Suppose the registers 0x4 and 0x5 in the Vole contain the bit patterns 0x3A and 0xC8, respectively. What bit pattern is left in register 0x0 after executing each of the following instructions:
- a. 0x5045
- b. 0x6045
- c. 0x7045
- d. 0x8045
- e. 0x9045
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
The instruction used to fill DX with the its sign bit is: *
CWD
SAR DX, 1
SAR DX, SF
SHR DX, CL
SHR DX, SF
SAR DX, 10
SAR DX, [SF]
SAR DX, 16
Computer Science
Assume the following register contents:
$t0 = 1111 1111 1111 1111 1111 1111 0011 1010 = 0xFFFFFF3A
$t1 = 0010 0011 0100 0101 0110 0111 1000 1001 = 0x23456789
a. What are the decimal values of $t0 and $t1, respectively, if they are 32-bit two's complement signed numbers?
b. For the register values shown above, what are $t2 binary and hexadecimal representations, respectively, for the following sequence of instructions?
sll $t2, $t0, 4
or $t2, $t2, $t1
c. For the register values shown above, what are $t2 binary and hexadecimal representations, respectively, for the following sequence of instructions?
sll $t2, $t0, 2
nor $t2, $t2, $t1
d. For the register values shown above, what are $t2 binary and hexadecimal representations, respectively, for the following sequence of instructions?
srl $t2, $t0, 4
and $t2, $t2, $t1
The instruction that moves each bit to the right, copies the lowest bit into the Carry flag, and copies the Carry flag into the highest bit position is the one that does this.
Chapter 2 Solutions
Computer Science: An Overview (12th Edition)
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 - 11. Classify each of the following 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
State whether each of the following is true or false. If false, explain why. To test for a range of values in a...
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
What common programming language statement, in your opinion, is most detrimental to readability?
Concepts Of Programming Languages
For each of the following activities, give a PEAS description of the task environment and characterize it in te...
Artificial Intelligence: A Modern Approach
Day of the Year Assuming a year has 365 days, write a class named DayOfYear that takes an integer representing ...
Starting Out with C++ from Control Structures to Objects (9th Edition)
The ________ object is assumed to exist and it is not necessary to include it as an object when referring to it...
Web Development and Design Foundations with HTML5 (8th 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
- (d) The table below shows the ALUcontrol signal of the datapath we discussed in class. Instruction Funct ALU Орсode ALUop ALU action operation field control Iw 00 load word XXXXXX add 0010 Sw 00 store word XXXXXX add 0010 beq 01 branch equal subtract 0110 XXXXXX R-type 10 add 100000 add 0010 R-type 10 subtract 100010 subtract 0110 R-type 10 AND 100100 AND 0000 R-type 10 OR 100101 OR 0001 R-type 10 set on less than 101010 set on less than 0111 You want to add the bne instruction into the datapath, which already includes the required hardware for the instruction. Write out the ALUop for bne and how you can determine whether the bne results in the branch to be taken.arrow_forwardGiven the instruction: j Target where its 32-bit format is 0x08100002 and its address in text segment is 0x00400016 Compute the target address (Target) in hexadecimal formatarrow_forwardUsing the following data definitions: bytel BYTE byte2 BYTE word1 WORD word2 WORD 3 OFFh, 1, 2 14h OFFFFh, 1, 2 word3 SWORD 7FFFh, 8000h word4 SWORD 9000h dword1 DWORD 10h, 20h, 30h, 40h dArray DWORD 10 DUP (?) Write an instruction that moves the lower 8 bits of word2 into the AL register.arrow_forward
- Q1: Select any value for AX register b15 b14 b13 b12 bl1 bl0 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 X |X X X х х X x x X xx X X x X Design a mask to perform the following: 1. Complement bits (b1, b5, b9, and b13) 2. Set bits (b0, b2, and b3) 3. Clear bits (b10, b11, and b12)arrow_forwardFor the ROM diagram please fill the truth table values using hexadecimal digits only. Output 3 is the most significative bit. A3 is the most significative address line. mo ml m2 m3 m4 m5 m6 m8 m9 ml0 ml1 m12 m13 ml4 ml5 A, A, A, A, °o о, о, о, о, Decoderarrow_forward0001 = Load AC from memory 0010 = Store AC to memory 0101 = Add to AC from memory 0011 = Load AC (the accumulator register) from an I/O device 0111 = Store AC to an I/O device With these instructions, a particular I/O device is identified by replacing the 12-bit address portion with a 12-bit device number. Remember that a number ending with a small ‘h’ means the number is a hexadecimal number. What is the hexadecimal string that expresses the following instructions? Load AC from memory location 62h. Add the contents of memory location 451h to AC. Store AC to memory location 8h. Store AC to I/O device number 8h.arrow_forward
- Design a simple ALU. There are 2 inputs, A and B, and each one is stored in 16-bit register and a 3-bit opcode. The output is a 17-bit register Y. The opcode controls ALU functions as follows: Opcode Function 000 001 010 011 100 101 110 111 Operation Y <= A Y <= A + B Y<=A-B Y <= A AND B Y <= A OR B Y <= A + 1 Y<=A-1 Y <= B A Add Subtract AND OR Increment A Decrement A B Write the full VHDL code for your design use your student ID as name of your top-level entity Hint: use multiplexer and simple logic and arithmetic assignments.arrow_forwardQ1: Select any value for AX register b15 b14 bl13 b12 bl1 b10 b9 b8 b7 b6 b5 b4 b3 b2 bl b0 |X x X X X X x xx x X X|X X Design a mask to perform the following: 1. Complement bits (b1, b5, b9, and b13) 2. Set bits (b0, b2, and b3) 3. Clear bits (b10, b11, and b12)arrow_forwardQuestion 36 It is an instruction that illustrates powers of two. A) RCR AL, 03H, with AL = 01H %3D B) RCL AL, 03H, with AL = 01H RCL AL, 03H, with AL = 10H Question 37 It is an instruction that needs to identify a positive or negative value of the register. A MOVZX AX,AL B) IDIV AX MUL AX Question 38 It is an instruction that illustrates the opposite of powers of two. A) RCL AL, 03H, with AL = 10H B) RCL AL, 03H, with AL = 01H RCR AL, 03H, with AL = 80H Question 39 It is an instruction to clear the register. A) XOR AX,AX B) CLC c) CLEARarrow_forward
- Q1: Select any value for AX register b15 b14 b13 b12 bl1 b10 b9 b8 b7 b6 b5 b4 b3 b2 bl b0 X X X X XXXX X XX X X Design a mask to perform the following: 1. Complement bits (b1, b5, b9, and b13) 2. Set bits (b0, b2, and b3) 3. Clear bits (b10, bl1, and b12) Q2: Write assembly language to: 1. Output message "Enter your name?" 2. Input your name from KB, character by character, stop by type /. 3. Count number of entered characters of your name. 4. Output message "Number of characters are=", in beginning of new line. 5. Output the result. Example: the screen appears as follows: Enter 3 characters (A-Z)? АНМED No. of characters are= 5arrow_forwardWrite the machine code of the instruction: subwf Ox53, 1 How to write answer: Write 4-digits hexadecimal value starting without '0x'. Example: if answer is 0X245F, then write 245F Example: if answer is 0X005F, then write 005F Answer:arrow_forwardQ1: Select any value for AX register b15 b14 bl3 b12 bl1 b10 b9 b8 b7 b6 b5 b4 b3 b2 bl b0 |X X |X xxX X XXX X X X Design a mask to perform the following: 1. Complement bits (bl, b5, b9, and bl3) 2. Set bits (b0, b2, and b3) 3. Clear bits (b10, b11, and b12)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
Computer Fundamentals - Basics for Beginners; Author: Geek's Lesson;https://www.youtube.com/watch?v=eEo_aacpwCw;License: Standard YouTube License, CC-BY