Question

1. Overwhelmingly, in a computer, a subtraction such as A-B is done by taking the two's...

1. Overwhelmingly, in a computer, a subtraction such as A-B is done by taking the two's complement of b and adding it. (You don't need to know the details of how to complement). In other words, the computer actually calculates A + (-B). Add together 0111 as A and 1101 as B and neglect any carry, or 5th bit in the result. The leftmost bit is a sign bit. What was B's value?

A) -13

B) -4

C) -3

D) -20

E) None of the above

_______________

2) What is the result of AND-ing AC 16 with 0C 16?

1) A3h

2) a0h

3) 0Ch

4) F3h

5) None of the above

______________________

3) A computer uses a 1Kbyte page size. The MAR is 20 bits long. How many entires are there in the page-table?

1) 20 K

2) 1K

3) 10K

4) 512

5) None of the above

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. B value is (1101)2 when we convert it (13)10

A +(-B) so B value is -13

2. 2) a0h

3. Most modern computers have special hardware called a memory management unit (MMU). This unit sits between the CPU and the memory unit. Whenever the CPU wants to access memory (whether it is to load an instruction or load or store data), it sends the desired memory address to the MMU, which translates it to another address before passing it on the the memory unit. The address generated by the CPU, after any indexing or other addressing-mode arithmetic, is called a virtual address, and the address it gets translated to by the MMU is called a physical address.

Normally, the translation is done at the granularity of a page. Each page is a power of 2 bytes long, usually between 1024 and 8192 bytes. If virtual address p is mapped to physical address f (where p is a multiple of the page size), then address p+o is mapped to physical address f+o for any offset o less than the page size. In other words, each page is mapped to a contiguous region of physical memory called a page frame.

The MMU allows a contiguous region of virtual memory to be mapped to page frames scattered around physical memory making life much easier for the OS when allocating memory. Much more importantly, however, it allows infrequently-used pages to be stored on disk. Here's how it works: The tables used by the MMU have a valid bit for each page in the virtual address space. If this bit is set, the translation of virtual addresses on a page proceeds as normal. If it is clear, any attempt by the CPU to access an address on the page generates an interrupt called a page fault trap. The OS has an interrupt handler for page faults, just as it has a handler for any other kind of interrupt. It is the job of this handler to get the requested page into memory.

Conceptually, the MMU contains a page table which is simply an array of entries indexed by page number. Each entry contains some flags (such as the valid bit mentioned earlier) and a frame number. The physical address is formed by concatenating the frame number with the offset, which is the low-order bits of the virtual address.

There are two problems with this conceptual view. First, the lookup in the page table has to be fast, since it is done on every single memory reference--at least once per instruction executed (to fetch the instruction itself) and often two or more times per instruction. Thus the lookup is always done by special-purpose hardware. Even with special hardware, if the page table is stored in memory, the table lookup makes each memory reference generated by the CPU cause two references to memory. Since in modern computers, the speed of memory is often the bottleneck (processors are getting so fast that they spend much of their time waiting for memory), virtual memory could make programs run twice as slowly as they would without it. We will look at ways of avoiding this problem in a minute, but first we will consider the other problem: The page tables can get large.

Suppose the page size is 4K bytes and a virtual address is 32 bits long (these are typical values for current machines). Then the virtual address would be divided into a 20-bit page number and a 12-bit offset (because 212 = 4096 = 4K), so the page table would have to have 220 = 1,048,576 entries. If each entry is 4 bytes long, that would use up 4 megabytes of memory. And each process has its own page table. Newer machines being introduced now generate 64-bit addresses. Such a machine would need a page table with 4,503,599,627,370,496 entries!

no of page table entries=virtual address space(MAR) /page size

Ans is 20k

Add a comment
Know the answer?
Add Answer to:
1. Overwhelmingly, in a computer, a subtraction such as A-B is done by taking the two's...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • CruzlD: @ucsc.odu Arithmetic and Logical Operations 19. Which of these 8-bit two's complement computations has carry...

    CruzlD: @ucsc.odu Arithmetic and Logical Operations 19. Which of these 8-bit two's complement computations has carry out but no overflow? Select two answers: 1 1 011001 10 0 111 1 110 O A. averflas 1IIOOIOO O B. 1 0000000 has 11 1 1 111 1 co has c.o 1110i no dverfle + 0100 1101 1 1 01 011 O D. overluw + 0101 1 1 0 1 E 1 1 10 1 0 + 11 1 1 1000 20. Using...

  • 2. Convert the following two's complement binary numbers to decimal numbers. These numbers are integers.

    2. Convert the following two's complement binary numbers to decimal numbers. These numbers are integers. a. 110101 b. 01101010 c. 10110101 3. Convert the following decimal numbers to 6-bit two's complement binary numbers and add them. Write the results in 6-bit two's complement binary number format and decimal number format. Indicate whether or not the sum overflows a 6-bit result. a. 14 + 12 b. 30 + 2 C. -7 + 20 d. -18-17 4. What is the signed/magnitude and two's complement range of...

  • Networks Hi guys. I need some assistance with a few questions below. 1. Which of the...

    Networks Hi guys. I need some assistance with a few questions below. 1. Which of the following is TRUE regarding a TCP 3-way handshake. a.   Consists of 3 segments being sent between 2 hosts       b.   Segments only carry data in the SYN, ACK and sequence number bits and bytes with no data       c.   No ACK is needed for the SYNACK received from the receiver       d.   A, B and C       e.   None of the above 2. Which...

  • 1. a) Perform the following binary subtractions of unsigned binary numbers. Convert your answer to decimal....

    1. a) Perform the following binary subtractions of unsigned binary numbers. Convert your answer to decimal. i) 101001012 - 01001001, ii) 110110102 - 100100112 b) Repeat the calculations above but for when the binary numbers are in two's complement form. Comment on the results of the two methods used, noting and discrepancies. 2. Find the sums of the following unsigned hexadecimal numbers. Indicate whether or not the sum overflows an equivalent 8-bit binary result. a) 1116 +2216 b) 1716 +3516...

  • (3 pts) Consider an unsigned fixed point decimal (Base10) representation with 8 digits, 5 to the...

    (3 pts) Consider an unsigned fixed point decimal (Base10) representation with 8 digits, 5 to the left of the decimal point and 3 to the right. a.      What is the range of the expressible numbers?    b.      What is the precision?    c.       What is the error?    ______________________________________________________________________________   (3 pts) Convert this unsigned base 2 number, 1001 10112, to each base given below   (Note: the space in the binary string is purely for visual convenience) Show your work. Using...

  • pls answer all questions 1) A step-by-step solution to a problem is called a. hardware b....

    pls answer all questions 1) A step-by-step solution to a problem is called a. hardware b. an operating system c. a computer language d. an algorithm 2) separated the programming task from the computer operation tasks. a. Algorithms b. Data processors c. High-level programming languages d. Operating systems 3) is a 16-bit code that can represent symbols in languages other than English. a. ASCII b. Extended ASCII c. EBCDIC d. Unicode 4) When you want to download music to a...

  • HW3: Problem 1: (first, study the example-1 in page-6) A computer uses 8-bit for FLP (1...

    HW3: Problem 1: (first, study the example-1 in page-6) A computer uses 8-bit for FLP (1 bit for sign, 4 bit for exponent with excess-7 rep. (see table below), rest for magnitude). Assume 0000 and 1111 in exponent field are reserved for denormalization. 6 Decimal 0 Unsigned 0000 Excess-7 Reserved used as -6 in unnormalized 1 0001 -6 2 0010 -5 3 0011 -4 4 0100 -3 5 0101 -2 0110 -1 7 0111 0 9 Decimal 8 Unsigned 1000...

  • 26. The is a group of bits that tells the computer to perform a specific operation...

    26. The is a group of bits that tells the computer to perform a specific operation A). program counter B). Opcode C). register D). microoperation 27. A condition called occurs in unsigned binary representation of a number when the result of an arithmetic operation is outside the range of allowable precision for the given number of bits. A). underflow B). 2's complement C). overflow D) bitwise complement 28. An iteration of the fetch-decode-execute cycle includes which of the following events?...

  • ·20) |19) 118) 117) 116) 115) Question 1.(20 points, I point each. Put answers into the...

    ·20) |19) 118) 117) 116) 115) Question 1.(20 points, I point each. Put answers into the above table) 13)一114) 2)- ) S-bit signed binary data can represent the decimal values from 0 to 256 2) 10111 is the two's complement representation of b. False a. True a. -23 b.-9 c.-7 d. +22 e.+7 3) 01110 is the two's complement representation of a.-13 b.-15 c.-9 d.+14 e.+18 a.A. b, B, c.A+B d, B c, (AB). a. Trueb. False a. True a....

  • COMPUTER NETWORKS: 1.   An organization with a Class B IP address of 128.25.0.0/16 wants eight subnets...

    COMPUTER NETWORKS: 1.   An organization with a Class B IP address of 128.25.0.0/16 wants eight subnets in its network. There are some legacy routers. Hence, they do not want to use zero and all-ones subnets. a.   How many bits are used in each of the following three fields? netID: ______________       subnetID: __________   hostID: _________________ b.   Determine the subnet mask that needs to be set in the hosts in dotted decimal notation. Subnet Mask in dotted decimal notation: ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬_______________________________________ c.  ...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT