Saturday, 9 March 2013

Define the following terms. i. Database ii. Database Management System iii. Data Model iv. Schema v. Data Independence

Database:

A collection of related information stored in a structured format. Database is often used interchangeably with the term table (Lotus Approach, for instance, uses the term database instead of table). Technically, they're different: A table is a single store of related information; a database can consist of one or more tables of information that are related in some way. For instance, you could track all the information about the students in a school in a students table. If you then created separate tables containing details about teachers, classes and classrooms, you could combine all four tables into a timetabling database. Such a multi-table database is called a relational database..

What are the Roles and Responsibilities of database administrator?

The Database Administrator (DBA) is the super-user of the system.
The role of the DBA is very important and is defined by the following functions.

Ø  Defining the Schema
The DBA defines the schema which contains the structure of the data in the application. The DBA determines what data needs to be present in the system and how this data has to be represented and organized.

Describe the different number representations

Number Representations

Computers are built using logic circuits that operate on information represented by two valued electrical signals. We label the two values as 0 and 1; and we define the amount of information represented by such a signal as a bit of information, where bit stands for binary digit. The most natural way to represent a number in a computer system is by a string of bits, called a binary number. A text character can also be represented by a string of bits called a character code.

Friday, 8 March 2013

Implement the following basic operations on double ended queues: a) Insertion at the rear end b) Insertion at the front end


a) insertion at the rear end on a double ended queue
/*function to insert an item at the rear end on a double ended queue*/
void insert_rear(int item, int q[], int *r)
{
     if (qfull(*r))/*check if queue is full*/
     {
          printf(“Queue Overflow\n”);
     }
     /*queue is not full*/
     q[++(*r)]= item;
}

Wednesday, 6 March 2013

Monday, 4 March 2013

Write a program in C++ using a nested for loop to print the contents of a double dimensional array in matrix format.


/*Program to print the contents of a double dimensional array in matrix format.*/
#include<iostream.h>
void main()
{
          int a[10][10]; /*two dimensional array for matrix representation*/
          int i,j;
          int row,col;
          cout<<”Enter row and column of a matrix (up to 10): “;
          cin<<row<<col;
cout<<”Enter the elements for the”<<row<< “X”<<col<<” matrix : ” <<endl;
/*store elements in two dimensional array*/

Sunday, 3 March 2013

Write about the key features of OOPS with relevant real time examples.

A major factor in the invention of Object-Oriented approach is to remove some of the flaws encountered with the procedural approach. In OOP, data is treated as a critical element and does not allow it to flow freely. It bounds data closely to the functions that operate on it and protects it from accidental modification from outside functions. OOP allows decomposition of a problem into a number of entities called objects and then builds data and functions around these objects. A major advantage of OOP is code reusability.

Objects

Write the different between a) Latch and flip flop b) Synchronous and Asynchronous latches.

a) Difference between Latch and flip flop

Latches are Level Sensitive, while Flip-Flops are Edge  Sensitive.
A positive level latch is transparent to the positive level(enable), and it lathes the final input before it is changing its level(i.e. before enable goes to '0' or before the clock goes to -ve level.
A positive edge flop will have its output effective when the clock input changes from '0' to '1' state ('1' to '0' for negedge flop) only.
For posedge flop check out the Morris mano book (digital design), in that he gave how the flop behaves with respect to an edge. (Explained with Gate level logic diagram). This will gives you a clear picture of Flop.

Friday, 1 March 2013

Write the different between a) Latch and flip flop b) Synchronous and Asynchronous latches.

a) Difference between Latch and flip flop

Latches are Level Sensitive, while Flip-Flops are Edge  Sensitive.
A positive level latch is transparent to the positive level(enable), and it lathes the final input before it is changing its level(i.e. before enable goes to '0' or before the clock goes to -ve level.
A positive edge flop will have its output effective when the clock input changes from '0' to '1' state ('1' to '0' for negedge flop) only.

Write the disadvantage of single slope integrator ADC and how does Dual slope integrator ADC overcome this problem.

Disadvantage of single slope integrator ADC:
In single-slope integrating ADC on op-amp based circuit, called an integrator to generate a saw tooth wave form is used, instead of the use of  a DAC with a ramped output.
The disadvantage of a single slope integrator ADC is the calibration trift dilemma and the solution to this problem is found in a design variation called the dual-slope converter. In the dual-slope converter, an integrator circuit is driven positive and negative in alternating cycles to ramp down and then up, rather than being reset to 0 volts at the end of every cycle.

Perform binary subtraction a) (10110)2 – (11000)2 b) (110110)2 – (111010)2 c) (00100)2 – (100100)2 d) (11110)2 – (00100)2 e) (11111)2 – (110011)2


a)         Using 1’s Complement method (because subtrahend is larger)
  10110(2)         
+00111(2)   (1’s complement of 11000)      
  11101(2)     Answer is negative and is in 1’s complement form
-00010(2)    Answer
                                                                      
                                                           
           

b)         Using 1’s Complement method (because subtrahend is larger)
  110110(2)      
+000101(2)   (1’s complement of 111010)
  111011(2)     Answer is negative and is in 1’s complement form
-000100(2)    Answer
                                                                      
          




c)         Using 1’s Complement method (because subtrahend is larger)
    00100(2)       
+011011(2)   (1’s complement of 100100)
  011111(2)     Answer is negative and is in 1’s complement form
-100000(2)    Answer











d)         Simple method (because subtrahend is smaller)
    11110(2)       
  - 00100(2)   
    11010(2)       Answer






e)         Using 1’s Complement method (because subtrahend is larger)
    11111(2)       
+001100(2)   (1’s complement of 110011)
  101011(2)     Answer is negative and is in 1’s complement form
-010100(2)    Answer