Vous êtes sur la page 1sur 14

COMPUTER ORGANIZATION

Group Assignment Section B


GROUP-10

Submitted to:
Prof. Partha Saha

Submitted by:
Aakash Raisinghani (IPM2013131)
Gowtham Chakravarthy (IPM2013041)
Pradyumna Choudhary (IPM2013061)
Shreya Singh (IPM2013089)
Vaishali Gautam (IPM2013105)

1. Simplify the following Boolean Functions in Sum of Product form by means of a three
variable map. Draw the logic diagram with (a) AND-OR gate (b) NAND gate
F(A,B,C)= (0,1,3,5,6)

BC
1
0

A
A

ABC+ABC= AB
ABC + ABC=BC
ABC + ABC= AC
ABC

F= AB + BC + AC + ABC

A) AND & OR

A
B

BC
1
1

BC
1
0

BC
0
1

B) NAND
A
B

2. What is virtual memory? Explain the relation between address spaces and memory spaces.

Virtual Memory:
Virtual memory is a concept used in some large computer systems that permit the user to
construct program as though a large memory space were available, equal to the totality of

auxiliary memory. Virtual memory is basically used to give an illusion to the programmers that
they have a very large memory at their disposal, even though the computer actually has a
relatively small main memory. A virtual memory system provides a mechanism for translating
program generated addresses into correct main memory locations.
The purpose of virtual memory is to enlarge the address space, the set of addresses a program
can utilize, eg., virtual memory might contain twice as many addresses as main memory.

Relation between address spaces and memory spaces:


An address used by a programmer will be called a virtual address. The set of such addresses is
the address space. An address in the main memory is called a location or physical address.
Memory space is the set of such locations. The address space is the set of addresses generated
by programs as they reference instructions and data; the memory space consists of the actual
main memory locations directly addressable for processing. Address and memory spaces are
identical in most of the computers. The address space is allowed to be larger than the memory
space in computers with virtual memory.
As an illustration, consider a computer with a main memory capacity of 32K words, where
K=1024. Fifteen bits are needed to specify a physical address in memory since 32K = 215.
Suppose that the computer has available auxiliary memory for storing 220 = 1024K words. Thus
auxiliary memory has a capacity for storing information equivalent to the capacity of 32 main
memories. Denoting the address space by N and the memory space by M, we then have this
example N = 1024K and M = 32K.

Figure. 1

Auxiliary Memory

Main Memory

Program 1
Data 1, 1

Program 1

Data 1, 2

Program 2

Data 1, 1

Data 2, 1

Address Space

Memory Space

N = 1024K = 220

M = 32K = 215

In a multiprogram computer system, computer and data are transferred to and from auxiliary
memory and main memory based on demands imposed by the CPU. Suppose that program 1 is
currently being executed in the CPU. Program 1 and a proportion of its associated data are
moved from auxiliary memory into main memory (fig. 1). Proportion of programs and data
need not be in continuous location in memory since information is being moved in and out, and
empty spaces may be available in scattered locations in memory. In the example, the address
field of an instruction code will consist of 20 bits but physical memory addresses must be
specified with only 15 bits. The CPU will reference instructions and data with a 20-bit address,
but the information at this address must be taken from physical memory because access to
auxiliary storage for individual words will be prohibitively long.

Figure 2:

3. Convert the hexadecimal number F7A7D8 to binary, octal, decimal and BCD.

Given Hexadecimal number = F7A7D8


(1111)(0111)(1010)(0111)(1101)(1000)2
Binary Value = (111101111010011111011000)2
Octal Value = (75723730)8

Decimal Value = (16230360)10


BCD Value = 0001 0110 0010 0011 0000 0011 0110 0000

4. Which is the most appropriate match for the items in the first column with the items in the
second column. Explain your answer.
(X.) Indirect Addressing

(I.) Array implementation

(Y.) Indexed Addressing

(II.) Writing re-locatable code

(Z.) Base Register Addressing

(III.) Passing array as parameter

(A) (X, III) (Y, I) (Z, II)

(B) (X, II) (Y, III) (Z, I)

(C) (X, III) (Y, II) (Z, I)

(D) (X, I) (Y, III) (Z, II)

Indexed addressing is used for array implementation where each element has indexes.
Base register is used to relocatable code which starts from base address and then all local
addresses are added to base address. Base Register addressing can be used to write relocatable
code by changing the content of Base Register.
Indirect addressing is done when array is passed as parameter where only name is passed.
While passing array as parameter we can make use of a pointer (as in C) and hence can use
indirect addressing.
So (A) is correct option.

5. Explain the operation of a memory management hardware. Explain the segmented page
mapping with a numerical example.

A memory management system is a collection of hardware and software procedures for


managing the various programs residing in memory. The memory management software is a
part of an overall operating system available in many computers.
Basic operations of memory management hardware are as follows:
Dynamic Storage Relocation:
One function of memory management is mapping logical memory references to physical
memory references. It creates provisions for sharing common information stored in memory by
different users. It also ensures protection of information against unauthorized access.

Segmentation:

The fixed page size used in virtual memory system causes certain difficulties with respect to
program size and the logical structure of programs. It is more convenient to divide programs
and data into logical parts called segments. A segment is a set of logically related instructions or
data elements associated with a given name. Segments may be generated by the programmer
or by the operating system. Examples of segments are a subroutine, an array of data, a table of
symbols, or a user's program.
The sharing of common programs is an integral part of a multiprogramming system. For
example, several users wishing to compile their Fortran programs should be able to share a
single copy of the compiler rather than each user having a separate copy in memory. Other
system programs residing in memory are also shared by all users in a multiprogramming system
without having to produce multiple copies.
Another issue in multiprogramming is protecting one program from unwanted interaction with
another. An example of unwanted interaction is one user's unauthorized copying of another
user's program. Another respect of protection is concerned with preventing the occasional user
from performing operating system functions and thereby interrupting the orderly sequence of
operations in a computer installation.

Numerical example:
A numerical example may clarify the operation of the memory management unit. Consider the 20-bit
logical address specified in Fig. 12-22(a). The 4-bit segment number specifies one of 16 possible
segments. The 8-bit page number can specify up to 256 pages, and the 8-bit word field implies a page
size of 256 words. This configuration allows each segment to have any number of pages up to 256. The
smallest possible segment will have one page or 256 words. The largest possible segment will have 256
pages, for a total of 256 x 256 = 64K words. The physical memory shown in Fig. 12-22(b) consists of 220
words of 32 bits each. The 20-bit address is divided into two fields: a 12-bit block number and an 8-bit
word number. Thus, physical memory is divided into 4096 blocks of 256 words each. A page in a logical
address has a corresponding block in physical memory.

Note that both the logical and physical address have 20 bits. In the absence of a memory management
unit, the 20-bit address from the CPU can be used to access physical memory directly. Consider a
program loaded into memory that requires five pages. The operating system may assign to this program
segment 6 and pages 0 through 4, as shown in Fig. 12-23(a).

The total logical address range for the program is from hexadecimal 60000 to 604FF. When the program
is loaded into physical memory, it is distributed among five blocks in physical memory where the

operating system finds empty spaces. The correspondence between each memory block and logical
page number is then entered in a table as shown in Fig. 12-23(b).

The information from this table is entered in the segment and page tables as shown in Fig. 12-24(a).
Now consider the specific logical address given in Fig. 12-24. The 20-bit address is listed as a five-digit
hexadecimal number. It refers to word number 7E of page 2 in segment 6. The base of segment 6 in the
page table is at address 35. Segment 6 has associated with it five pages, as shown in the page table at
addresses 35 through 39. Page 2 of segment 6 is at address 35 2 = 37. The physical memory block is
found in the page table to be 019. Word 7E in block 19 gives the 20-bit physical address 0197E. Note
that page 0 of segment 6 maps into block 12 and page 1 maps into block 0. The associative memory in
Fig. 12-24(b) shows that pages 2 and 4 of segment 6 have been referenced previously and therefore
their corresponding block numbers are stored in the associative memory. From this example it should be
evident that the memory management system can assign any number of pages to each segment. Each
logical page can be mapped into any block in physical memory. Pages can move to different blocks in
memory depending on memory space requirements. The only updating required is the change of the
block number in the page table. Segments can grow or shrink independently without affecting each
other. Different segments can use the same block of memory if it is required to share a program by
many users. For example, block number 12 in physical memory can be assigned a second logical address
F0000 through FOOFF. This specifies segment number 15 and page 0, which maps to block 12 as shown
in Fig. 12-24(a).

6. Draw the logic diagram of a 3 input eight output decoder and explain its operation by
means of a function table.

Discrete quantities of information are represented in digital computers with binary codes. A
binary code of n bits is capable of representing up to 2 n distinct elements of the coded
information. A decoder is a combinational circuit that converts binary information from the ncoded inputs to a maximum of 2n unique outputs. If the n-bit coded information has unused bit
combinations, the decoder may have less than 2n outputs.

The logic diagram of a 3-to-8 line decoder is shown above. The three data inputs, A0, A1 and A2
are decoded into eight outputs, each output representing one of the combinations of the three
binary input variables. The three inverters provide the complement of the inputs, and each of
the eight AND gates generates one of the binary combination. A particular application of this
decoder is a binary-to-octal conversion. The input variables represent a binary number and the
outputs represent the eight digits of the octal number system. However, a 3-to-8 line decoder
can be used for decoding any 3-bit code to provide eight inputs, one for each combination of
the binary code.
Commercial decoders include one or more enable inputs to control the operation of the circuit.
The decoder of the above figure has one enable input, E. The decoder is enabled when E is
equal to 1 and disabled when E is equal to 0.

The operation of the decoder can be clarified using the truth table listed below.

Inputs

Enable

E
0
1
1
1
1
1
1
1
1

A2
X
0
0
0
0
1
1
1
1

A1
X
0
0
1
1
0
0
1
1

Outputs
A0
X
0
1
0
1
0
1
0
1

D7
0
0
0
0
0
0
0
0
1

D6
0
0
0
0
0
0
0
1
0

D5
0
0
0
0
0
0
1
0
0

D4
0
0
0
0
0
1
0
0
0

D3
0
0
0
0
1
0
0
0
0

D2
0
0
0
1
0
0
0
0
0

D1
0
0
1
0
0
0
0
0
0

When the enable input E is equal to 0, all the outputs are equal to 0 regardless of the values of
the other three data inputs. The three Xs in the table designate dont-care conditions. When
the enable input is equal to 1, the decoder operates in a normal fashion. For each possible input
combination, there are seven outputs that are equal to 0 and only one that is equal to 1. The
output variable whose value is equal to 1 represents the octal number equivalent of the binary
number that is available in the input data lines.

D0
0
1
0
0
0
0
0
0
0

Vous aimerez peut-être aussi