Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1- Name a few computer operating systems. 2- What is the full form for MS-DOS ?

ID: 1830561 • Letter: 1

Question

1- Name a few computer operating systems. 2- What is the full form for MS-DOS ? 3- What is the difference between a logical address and aphysical address?show how a physical address is generated from alogical address. 4- what are the following registers used for: DS, CS, SS, SP,IP, AX 5- Define the function each of the following flag bits in theflag register: Overflow, Carry, Sign and Zero. 1- Name a few computer operating systems. 2- What is the full form for MS-DOS ? 3- What is the difference between a logical address and aphysical address?show how a physical address is generated from alogical address. 4- what are the following registers used for: DS, CS, SS, SP,IP, AX 5- Define the function each of the following flag bits in theflag register: Overflow, Carry, Sign and Zero.

Explanation / Answer

Almost all implementations of virtual memory divide the virtualaddress space of an application program into pages; a page isa block of contiguous virtual memory addresses. Pages are usuallyat least 4K bytes in size, and systems with large virtual addressranges or large amounts of real memory (e.g. RAM) generally uselarger page sizes.

Almost all implementations use page tables to translate thevirtual addresses seen by the application program into physicaladdress (also referred to as "real addresses") used by the hardwareto process instructions. Each entry in the page table contains amapping for a virtual page to either the real memory address atwhich the page is stored, or an indicator that the page iscurrently held in a disk file. (Although most do, some systems maynot support use of a disk file for virtual memory.)

Systems can have one page table for the whole system or aseparate page table for each application. If there is only one,different applications which are running at same time share asingle virtual address space, i.e. they use different parts of asingle range of virtual addresses. Systems which use multiple pagetables provide multiple virtual address spaces - concurrentapplications think they are using the same range of virtualaddresses, but their separate page tables redirect to differentreal addresses.

DS- generally points at segment where variables aredefined.

SS- points at the segment containing the stack.


IP- the instruction pointer:

IPregister always works together with CS segmentregister and it points to currently executinginstruction.

In computer processors, the overflow flag(sometimes called V flag) is usually asingle in a system bit status register used to indicate whenan arithmatic overflow has occurred in an operation.

The overflow flag is set when the Most Signfigant Bit (MSB) isset or cleared. For example, take the addition of 127 and 127. The8 bit signed binary number of 127 is represented as 0111 1111. TheMSB (the bit to the far left) is 0. When these two 8 bit numbersare added the result is 254, or 1111 1110. Noticed now that the MSBis now 1 and not 0. Therefore, the overflow flag has been set.


CARRY:

In computer processors the carry flag(usually indicated as the C flag) is a singlebit in asystem status (flag) register used to indicatewhen an arithmetic carry or borrow has been generated out ofthe most significant ALU bit position. When used after anarithmetic operation it could be considered to be the unsignedequivalent of the overflow flag.

SIGN:

In computer processor the negativeflag or sign flag is a single bit in asystem status (flag) register used to indicate whether the resultof last mathematic operation resulted in a value whose mostsignificant bit was set. In a two's complement interpretation of theresult, the negative flag is set if the result was negative.

For example, in an 8-bit signed number system, -37 will berepresented as 1101 1011 in binary (the most significant bit is 1),while +37 will be represented as 0010 0101 (the most significantbit is 0).


ZERO:

The Zero Flag is a flag stored in the FLAGSregister on all x86 compatible CPUs. It is bit 6. When itis set to 1, it means that the result of an instruction was zero.The Zero Flag is changed by all math instructions and the CMPinstruction (a compare instruction works by subtracting the twovalues).