Posts

Admin use case diagram

Image

ADDITION, SUBTRACTION AND COMPARISON in ASSEMBLY LANGAGE

ADD (Addition) • This is used to add byte/word of data of 2 registers or a register & a memory-location • The only types of addition not allowed are memory-to-memory and segment register (Table 5-1). Register Addition • Whenever arithmetic and logic instructions execute, the contents of the flag-register changes. • Any ADD instruction modifies contents of sign, zero, carry, auxiliary, carry, parity & overflow flags. Example 5-1: Program to compute AX=BX+CX+DX. ADD AX,BX ADD AX,CX ADD AX,DX Immediate Addition • Immediate addition is employed whenever constant-data are added. Example 5-2: Program to add immediate data MOV DL,12H ADD DL,33H Memory-to-Register Addition Example 5-3: to add two consecutive bytes of data (stored at the data segment offset locations NUMB and NUMB+1) to the AL register. Array Addition Example 5-4: Program to add the contents of array element at indices 3, 5 and 7 MOV AL,0 ;clear sum MOV SI,3 ;address element 3 ADD AL,ARRAY[SI] ;add element 3

Data structure mcq

The memory address of the first element of an array is called a. floor address b. foundation address c. first address d. base address The memory address of fifth element of an array can be calculated by the formula a. LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array b. LOC(Array[5])=Base(Array[5])+(5-lower bound), where w is the number of words per memory cell for the array c. LOC(Array[5])=Base(Array[4])+(5-Upper bound), where w is the number of words per memory cell for the array d. None of above Which of the following data structure can't store the non-homogeneous data elements? a. Arrays b. Records c. Pointers d. None Which of the following data structure store the homogeneous data elements? a. Arrays b. Records c. Pointers d. None Which of the following is not the required condition for binary search algorithm? a. The list must be sorted b. there should be the direct access to the middle element in any sublist c.

Semantics of LTL

A transition system M=(S,→,L) is a set of states S endowed with a transition relation → (a binary relation), such that every s ∈ S has some s’∈ S with s → s’, and a labeling function L: S →P(Atoms). Transition systems are also simply called models. a model has a collection of states S, a relation →,saying how the system can move from state to state, and, associated with each state s, one has the set of atomic propositions L(s)which are true at that particular state. L is that it is just an assignment of truth values to all the propositional atoms. A transition system has more than one state, so this assignment depends on which state s the system is in: L(s) contains all atoms which are true in state s. All the information about a (finite) transition system M always be figured by using directed graphs whose nodes (which we call states) contain all propositional atoms that are true in that state. For example, if our system has only three states s0, s1 and s2; if the only possible transit

Semantics of LTL

Logical Paradigms in Computing Practical patterns of specifications: • It is impossible to get to a state where started holds, but ready does not hold: G¬(started ∧¬ready) • For any state, if a request (of some resource) occurs, then it will eventually be acknowledged: G(requested → F acknowledged). • A certain process is enabled infinitely often on every computation path: GF enabled. • Whatever happens, a certain process will eventually be permanently deadlocked: FG deadlock. • If the process is enabled infinitely often, then it runs infinitely often. GF enabled → GF running. • An upwards travelling lift at the second floor does not change its direction when it has passengers wishing to go to the fifth floor: G(floor2 ∧ directionup ∧ ButtonPressed5 → (directionup U floor5)). Here, our atomic descriptions are boolean expressions built from system variables, e.g., floor2. Important equivalences between LTL formulas: Definition: We say that two LTL formulas φ and ψ are semantically equivalent,

Program control instruction procedure

PROCEDURES A procedure is a group of instructions (subroutine or function) that usually perform a specific task. Advantages: Disadvantages: (a)It is reusable section of the software that It takes the compiler a small amount is stored in memory once, but used as often of time to link the procedure and as necessary. return from it. (b)It saves memory space. (c)Makes easier to develop software. PROCEDURES How procedure links with main program The CALL instruction links to the procedure and the RET (return) instruction return from the procedure. The CALL instruction pushes the address (return address) of the instruction following the CALL on the stack. The RET instruction removes an address from the stack so the program return to the instruction following the CALL. A procedure begins with the PROC directive and ends with the ENDP directive. The PROC directive is followed by the type of procedure: NEAR (intrasegment) or FAR (intersegment). Format of Procedure XXX