Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 11.3, Problem 11.1PP
Program Plan Intro
IP addresses:
- The IP address denotes an unsigned integer that is 32-bit.
- The IP addresses is been stored by network programs in IP address structure.
- The addresses present in IP address structure are stored in network byte order.
- An unsigned 32-bit integer is converted from host byte order to network byte order by “htonl” function.
- An unsigned 32-bit integer is converted from network byte order host byte order by “ntohl” function.
- The IP address is presented to humans in a form known as “dotted-decimal” notation.
- Each byte is been represented by its corresponding decimal value and is separated by a period from other bytes.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
(c) The following Sigma 16 program has been loaded into memory at address 0000:
load R3,y[RO]
load R4,x[RO]
lea R5, 2[RO]
sub R1,R4,R3
mul R2,R1,R5
store R2,w[RO]
trap RO,RO,RO
x data 10
y data 12
w data 0
Show the content of the memory writing hexadecimal representation and using a
table with 3 columns: the memory address, the contents of that memory address,
and an explanation of what "the content (of that memory address) means". As a
reference, here are the opcodes for RRR instructions: add 0, sub 1, mul 2, trap c.
And here the opcodes for RX instructions: lea 0, load 1, store 2.
[7]
Problem
Question 03 (CO3) [0.5 + 0.5 = 1]: Given below are the contents of several Intel 8086 registers
and PHYSICAL memory addresses (ALL in hexadecimal):
Registers:
Memory Locations [Physical Address] = Contents
[05000] = 3300
[06000] = 4444
[07000] = 5555
[95000] = 367A
[96000] = 6666
[97000] = 10C5
DI = 3000
%3D
BX = 3000
%3D
ВР 3 С345
For the following instructions, determine the contents of AX after the each of the instruction has
been executed:
(а) MOV
(b) MOV
АХ, ВР
АХ, [ВХ+DI]
AX =
AX
4. The following problems deal with translating from C code to MIPS code or MIPS code to
C code. Assume that the signed variables f, g, h and i are assigned to registers $s0,
$1, $2, $3 respectively. Assume the base address of the integer arrays A and B are
in registers $s4 and $55 respectively. Translate the following MIPS code to C code.
Please indicate which elements of integer array A and B are modified by this code.
addi $t0, $1, 6
sll $t0, $t0, 4
add $t0, $t0, $5
Iw $t0, 0($t0)
sw $t0, 4($4)
Chapter 11 Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
Ch. 11.3 - Prob. 11.1PPCh. 11.3 - Prob. 11.2PPCh. 11.3 - Practice Problem 11.3 (solution page 967) Write a...Ch. 11.4 - Prob. 11.4PPCh. 11.5 - Prob. 11.5PPCh. 11 - Prob. 11.6HWCh. 11 - Prob. 11.7HWCh. 11 - Prob. 11.8HWCh. 11 - Modify TINY SO that when it serves static content,...Ch. 11 - Prob. 11.10HW
Knowledge Booster
Similar questions
- 3- What is the difference between: a- MOV BX,[1234H] and LEA BX,[1234H] b- LDS AX,[200H] and LES AXX,[200H] 4-Use MOV to load address of memory MEM1.arrow_forwardProblem 1. This problem is about operand modes, in particular about memory addressing using the operand modes described in lecture and the textbook. The following shows the contents of a portion of the program memory (locations Ox10000 through 0x10040), and certain registers. All contents are 64-bit quantities. Address Memory Contents 0x10040 0x10038 0x10030 0x10028 0x10020 0x10018 0x10010 0x10008 0x10000 a. movq (%rdi), %rax b. movq (%rdi,%rsi), %rax 100 0x10040 200 25 0x10028 0x10020 c. movq 8(%rdi, %rcx, 4) %r8 d. movq -8(%rdi,%rsi), rbx 500 0x10018 2 Register Contents %rdi 0x10008 %rsi %rdx %rcx For each of the following instructions, say what value ends up in the destination register. Each instruction starts with the state shown above, i.e., the effects do not accumulate. 0x20 8 4arrow_forwardTopic : Writing MIPS code. 1.Consider the equation and write MIPS code for it: X=(A[4]+B[2])+(B[3]-5X); Assume array A stores floating-point values and its base address in $s0 and array B stores integer values and its base address is in $s1 register. X is in register $s2.arrow_forward
- (c) What are the physical memory addresses for each of the following logical addresses for the segment table (Table 2)? Note any that are invalid. The logical addresses are: (i) 3, 15 (ii) 0, 512 (iii) 1, 4096 (iv) 0,1 Table 2: Segment table Segment Base Address Length 0 400 1 4096 2 810 3 1024 16384 4096 32768 20480arrow_forwardH.W 2) How should the pointer with segment base address equal to A00016and offset address 55FF16 be stored at an even-address boundary starting at 0000816? Is the double word aligned or misaligned? Address Memory (hexadecimal) 0000B 16 AO 0000A16 00 0000916 55 0000816 FFarrow_forward1A. Consider the following code: AREA ASCENDING, CODE, READONLY ENTRY MOV R8, #2 LOOPO LDR R1, [R2], #4 STR R1, [R3], #4 SUBS R8, R8, #1 CMP R8, #0 BNE LOOPO How many clock cycles are required to complete the execution of the above code on non- pipelined processor assuming each instruction will take 1 cycle to execute completely? Show calculations. How many clock cycles required to complete the execution of the above code on 3-staged pipelined processor? Draw the pipeline diagram for the same. Let one stage requires one clock cycle and assume all memory references hit in cache.arrow_forward
- // Example 8.27a void Func(int a[], int & r) { int i; for (i = 0; i < 100; i++) { a[i] = r + i/2; }} The Intel assembler produces the following assembly code from Example 8.27a (32 bit mode):arrow_forwardDO any part if do able A Instruction Set Architecture A.1 Instruction set We present a list of instructions typical of a RISC (reduced instruction set computer) machine. In data-movement and control instructions, the addresses may be immediate #X, direct (memory) M, indirect (memory) [M], register r, or register indirect [r] addresses. Data-processing instructions use immediate or register addressing. PC is the programme counter and a <- b indicates that the value of b is placed in a. LOAD a, b a <- b STOR a, b a <- b ADD a, b, c a <- b + c ASH a, b, c a <- (b >>[s] c) LSH a, b, c a <- (b >>[u] c) BR a PC <- a SUB a, b, c a <- b - c BEQ a, b, c PC <- a if b = c MUL a, b, c a <- b * c BNE a, b, c PC <- a if not b = c DIV a, b, c a <-…arrow_forwardQ1- Write a program in assembly language for the 8085 microprocessor to send 10 bytes of data located at the memory address (3000H to 3009H) using SOD at a baud rate of 1200. Information: The 8085 processor operates at a frequency of 3.072 MHz. When sending each of the required bytes, you must adhere to the following: The two high bits of the start bits must be sent, after that the data bits are sent, after that the low bit of the stop bit is sent. The following flowchart will help you, but you should notice that this flowchart deals with one byte, and you are required to deal with 10 bytes. The solution must be integrated and include the calculation of the baudrate delay time 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_forward
- 12pt Paragraph v BIUA 2 T² Р Question 5 00 0 1 What is the minimum number of temporary registers (i.e., in addition to R2, R3, and R5 registers) needed to compute R5 <-- 0 2 my 03 Ph D₂ - (R5-R3+R5-R2)?arrow_forwardQ1- Write a program in assembly language for the 8085 microprocessor to receive 10 bytes of data via the SID and store it at the memory address (3000H to 3009H) using a baud rate of 1200. Information: The 8085 processor operates at a frequency of 3.072 MHz. When you receive each byte of the required bytes, you must adhere to the following: The bits of two high bits will be received at the beginning of the reception (start bits), after that the data bits will be received, after that the low bit of the stop bit will be received (stop bit). The following flowchart will help you, but you should notice that this flowchart deals with one byte, and you are required to deal with 10 bytes The solution must be integrated and include the calculation of the baudrate delay time Of+CD!HID+[00 Yes SIDATA Read SID Start Bit? Wait for Half-Bit Time Set up Bit Counter Wait Bit Time Read SID Save Bit Decrement Bit Counter All Bits Received? Add Bit to Previous Bits Go Back to Get Next Bit Return IMUNIarrow_forward27% 03:49 Asiacell lI. مجموعة اسئلة في مادۃ المعالجات.pdf 8086 Microprocessor and Interfacing: reference questions. Q1) Write an ALP to perform multiplication of + 4 H and - 5 H. Store the result in register CX. Solution: Program Comments MOV AL, 04 H 04 AL MOV BL, 05 H 05 BL NEG BL -05 BL IMUL BL; +04 -05 H -14 H MOV CX, AX AL BL AX HLTarrow_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