Wednesday, 23 December 2015

32 Bit:-Addition of 10 User Input Hexadecimal Number using Assembly Language x86 (With detailed comments)

Q: Accept 10, 32 bit hexadecimal numbers from the user and print their sum.

Detailed Comments :- Thanks to the free time in the lab. :-)


Assembly Language

Steps involved:-


  1. Accept the numbers in Ascii format
  2. Convert the numbers to hexadecimal form.
  3. Add the numbers to get the sum.
  4. Convert the sum to Ascii format.
  5. Display the result. 

Monday, 21 December 2015

Advanced Calculator in QT

This calculator is designed to work similar to the standard calculator
Functions provided are :-
  1. Addition
  2. Subtraction
  3. Division
  4. Multiplication



64 bit:-Addition of 10 User Input Hexadecimal Number using Assembly Language x64

Q: Accept 10, 64 bit hexadecimal numbers from the user and print their sum.

Steps involved:-


  1. Accept the numbers in Ascii format
  2. Convert the numbers to hexadecimal form.
  3. Add the numbers to get the sum.
  4. Convert the sum to Ascii format.
  5. Display the result.


Monday, 14 December 2015

Sunday, 13 December 2015

Linux Daemon Process

Q:- Create a daemon process in linux to write the numbers 1-10 to text file. Use C programming language.

Linux Copy Command Implementation

Linux-Copy-Command-In-CQ:- Write a C program to implement the copy command in Linux. Your program must check whether appropriate number of arguments are displayed or not; if not, then display the correct syntax to be used. It should also check for error like file not found or not created.

Friday, 11 December 2015

Max Heap in Python

Q:- Write a menu driven ,python program to implement a Max Heap.

Stack and Queue - Java Applet

Q:- Design a Java Applet to implement stack and queue. Provide buttons for various operations like pop, push etc. Design separate classes for stack, queue and the applet.

Wednesday, 9 December 2015

Process Management-Shell Scripting Linux


Process-management-Linux-Shell-Scripting
 Q:-Write a shell script for Process Management in Linux. Provide facility to create a process, display running process and to change the priority of the process.

 

 

Friday, 4 December 2015

C Program to Implement Cat Command Under Linux



Cat Command

This command is used to display the contents of a text file on the terminal. Using c programing we are now going to implement the function of copy command.


Implementation-Cat-Command-Linux



 Program


  1. This program should accept command line arguments, so that it behaves similar to the cat command. 
  2. The number of arguments should be checked.
  3. If the number of arguments are inappropriate a message should be displayed indicating the proper syntax for usage of the command.

 

Linux Shell Scripting - Computer Information

Q:- Write a shell script to display the name of the operating system, the login name and the host name using BASH scripting.

Directory Handling-Bash Scripting


Q:- Write a menu driven script using bash programming to provide the user with the following facilities:-
  1. Create a new directory
  2. Delete a directory
  3. Display the file nodes
  4. Change the current working directory

 

File Handling in Linux -BASH SCRIPT

File handling can easily be carried out by an administrator in Linux using Shell Scripts or BASH programming. Below is the code for a script for file handling in Linux.

Topological Sort-Java

In the field of computer science, a topological sort (sometimes abbreviated toposort) or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering. For instance, the vertices of the graph may represent tasks to be performed, and the edges may represent constraints that one task must be performed before another; in this application, a topological ordering is just a valid sequence for the tasks. A topological ordering is possible if and only if the graph has no directed cycles, that is, if it is a directed acyclic graph (DAG).

Wednesday, 2 December 2015

Caesar Cipher C programming

Caesar-Cipher-C-Program
Caesar Cipher
Caesar Cipher is one the most simplest encryption techniques. It can be easily be decrypted using frequency counts. This program uses this simplest of the decryption techniques so is not likely to be the best but is definitely the easiest to code and understand. To understand how this program works you must have a thorough knowledge of ASCII characters.

Sorting in Python


  1. This article covers various sorting techniques using Python Programming and Object Oriented Concepts. 
  2. The sorting techniques have been implemented using functions inside a class.
  3. The following sorting techniques have been covered:- 

Monday, 30 November 2015

Threaded Binary Tree

TBT - Threaded Binary Tree

In computing, a threaded binary tree is a binary tree variant that allows fast traversal: given a pointer to a node in a threaded tree, it is possible to cheaply find its in-order successor (and/or predecessor).

Below is an implementation of a TBT in C++ language.

Sunday, 29 November 2015

Calendar - C Program

calendar-c-program
Calendar

How to create a Calendar ?

Creating a calendar is quite easy. Consider the following facts first.
  • A normal year has 365 days.
  • A leap year has 366 days.
  • Also 365%7=1 while 366%7==2
  • So normally if January1 is a Monday for a year x for the next year(x+1) January 1 will be Tuesday. However if year x is a leap year then for the next year January 1 will be a Wednesday.

Saturday, 28 November 2015

Binary Search Tree Dictionary

  1. A dictionary can be either implemented using a linked list or  a binary search tree.
  2. Insertion and Searching in the former is more time consuming as compared to the later. Thus the later approach is preferred. 
  3. Each node will have 2 children.
  4. The values in the left subtree will be lesser than the parent and the values in the right subtree will be greater than the parent for each node.
  5. Threaded children have not been used in this data structure.
  6. This binary search tree can be balanced by using AVL tree method. This will further reduce the search time (searching in a skewed tree is equivalent to searching in a link list).
  7. Wikipedia Link for BST :- https://en.wikipedia.org/wiki/Binary_search_tree

Graphs Newspaper Boy Problem -CPP

Q:-Implement DFS ,BFS, Prim's and Kruskals algorithms so as to help the newspaper boy deliver the newspapers.

Solution
Language Used:-C++
  1. The graph is represented using array data structure. 
  2. DFS , BFS , Prim's and Kruskals are written using functions inside the classes 

AVL Tree

Wikipedia Link:-https://en.wikipedia.org/wiki/AVL_tree
An AVL tree is a self-balancing binary search tree.
Inventors:- Georgy Adelson-Velsky and Evgenii Landis

C++ Program for AVL tree

Friday, 27 November 2015

Tic Tac Toe Java Program


Tic Tac Toe is classic game played using pen and paper.
For rules and more information please refer the following:-
Wikipedia article on tic tac toe:-
https://en.wikipedia.org/wiki/Tic-tac-toe

Below is the code for implementation of this all time classic in Java language.

Lsmovie-linux shell scripting

Do you have a ton of movies on your Linux Machine ? Do you wish that you could maintain a nice movie list, a list that lists all your movies ? Every time you someone asks for movies just show them the list.