Saturday, 13 April 2019

Computer Organization Questions in Degree college lecturers


1. How many ‘1’s are there in the result produced by 8-bit 2’s complement addition of 29 and -46?
Ans: 7
2. Consider a hard disk containing 1000cylinders, 10 platters each with 2 recording surfaces and 63 sectors per track. What is the position of the sector whose 3-D disk address is <200,15,55> representing cylinder, surface, sector numbers respectively.
Ans: 253000
3. Consider implementation of a Boolean function of n variables using only one multiplexer and one inverter. the minimal size of multiplexer required is
Ans: 2n-1 to 1
4. How many 64Kx1RAM chips are required to provide a memory of size 256K bytes?
Ans: 32
5. The number of full and half adders required to add 16- bit number is
Ans: . 1 half adder , 15 full adders
6. The micro-operation that performs division of a signed binary integer by 2 is ____
Ans: arithmetic shift right
7. When a cache memory is 30 times faster than main memory/RAM and cache hit ratio is 90%, the speed up gained using the cache is approximately ______
Ans: 27 times
8. The simplified SOP(Sum of Products) form of the boolean expression (P+Q'+R').(P+Q'+R).(P+Q+R') is
Ans: ( P + Q'. R')
9. Which of the following is NOT a method used for data transfer between peripherals and memory?
1. Programmed I/O
2. Pipelining
3. Direct Memory Access
4. Interrupt initiated I/O
 Ans:
Pipelining

Wednesday, 10 April 2019

How AVL tree is better than BST?

How AVL tree is better than BST?
Ans: A major advantage of using the tree structure is to be able to access data very efficiently.
The access time is O(h) where h is the height of the tree.
When a Binary search tree is balanced with n nodes, h = O(log n). Example of balanced BST is shown below
so the access time is O(log n) much better than O( n) provided by linear data structure such as an array or linked list
But a BST may degenerate into a linear structure if not balanced
Consider a situation when 1,2,3 ... n are inserted into BST, BST becomes degenerate tree and search take O(n) time.
Hence BST must be balanced. AVL is a balanced BST and ensures the height of the tree is always O(log n) by rotations.
Search, insertion and deletion in AVL tree is always  log n  always whereas search, insertion and deletion in BST is O(n) in worst case.