8086 Program to mask upper nibble



ØØ       Explanation :
·            Let the 8 bit number be in the AL register. We have to mask the upper nibble ie we have to separate the upper nibble. In the result only LSB number should be present.


ØØ       Explanation :
·            Let the 8 bit number be in the AL register. We have to mask the upper nibble ie we have to separate the upper nibble. In the result only LSB number should be present.

8086 Program to mask lower nibble



Explanation :
·           Let the 8 bit number be in the AL register. We have to mask the lower nibble, ie we have to separate the lower nibble. In the result only MSB number should remain.
For example :



Explanation :
·           Let the 8 bit number be in the AL register. We have to mask the lower nibble, ie we have to separate the lower nibble. In the result only MSB number should remain.
For example :

8086 Program to find 2’s complement of a number



ØØ       Explanation :
·          We have a number. Let this number be stored in register AX. Our task is to find 2’s complement of this number. We use NEG instruction. It replaces the number in AX with 2’s complement of the number in AX, directly.



ØØ       Explanation :
·          We have a number. Let this number be stored in register AX. Our task is to find 2’s complement of this number. We use NEG instruction. It replaces the number in AX with 2’s complement of the number in AX, directly.

8086 program To find 1’s complement of a number.




ØØ       Explanation :
·            We have a number. Let the number be loaded in the register AX. Now, we have to find 1’s complement of this number. One’s complement of a number means to invert each bit of a number. NEG instruction in 8086 allows us, to find 2’s complement of a number, subtracting 1 from 2’s complement gives the 1’s complement of the number.




ØØ       Explanation :
·            We have a number. Let the number be loaded in the register AX. Now, we have to find 1’s complement of this number. One’s complement of a number means to invert each bit of a number. NEG instruction in 8086 allows us, to find 2’s complement of a number, subtracting 1 from 2’s complement gives the 1’s complement of the number.

C program for Huffman's Algorithm



Huffman's Algorithm




Huffman's Algorithm


C program for Dijkstra's Algorithm



Dijkstra's Algorithm




Dijkstra's Algorithm


c++ program to create Database using STL



Database using STL
//Note : This pogram should be run under Linux using g++ or VCC



Database using STL
//Note : This pogram should be run under Linux using g++ or VCC