Posts

Showing posts from September, 2020

HOW BASIC COMPUTER WORKS USING COMMON BUS SYSTEM

Image
  Common Bus System The basic computer has eight registers , a memory unit, and a control unit . Paths must be provided to transfer information from one register to another and between memory and registers. The number of wires will be excessive  if connections are made between the outputs of each register and the inputs of the other registers. A more efficient  scheme for transferring information in a system with many registers is to use a common bus. The connection of the registers  and memory of the basic computer to a common bus system is shown in Fig. below. The outputs of seven registers and memory are connected to the common bus. The specific output  that is selected for the bus lines at any given time is determined from the binary value of the selection variables S 2 , S 1 , and S 0 . The number along  each output shows the decimal equivalent of the required binary selection. For example, the number along the output of DR is 3. The 16-bit outputs of DR  are placed on the bus lin

COMMOM BUS SYSTEM USING MULTIPLEXER

Image
                                                  COMMON BUS SYSTEM USING MULTIPLEXER                                CHECK OUT THE STATEMENTS WRITTEN  ON RIGHTMOST SIDE The construction of this bus system for 4 registers is shown above. The bus consists of 4×1 multiplexers with 4 inputs and 1 output and 4 registers with bits numbered 0 to 3. There are 2 select inputs S0 and S1 which are connected to the select inputs of the multiplexers. The output 1 of register A is connected to input 0 of MUX 1 and similarly other connections are made as shown in the diagram. The data transferred to the bus depends upon the select lines. A table for the various combinations of select lines is shown below.   As we can see that when S1S0=00, register A is selected because on 00 the 0 data inputs of all the multiplexers are applied to the common bus. Since the 0 data inputs of all the multiplexers receive the inputs from the register A, thus register A gets selected. Similarly for other co

MULTIPLEXER IN COMPUTER ORGANISATION

Image
  MULTIPLEXER is a logic circuit which accepts  many inputs,but selects only one input to be passed  on to the output.It is sometimes referred to as a  data selector,since it selects only one of the  inputs.The selection of the input to be passed is  done by a set of Control Signals known as the  Select inputs.The value on these select inputs will  determine the input that is to be passed on to the  output.Multiplexer is also known as MUX    NO OF THE SELECT LINES ARE EQUALS TO: n=2^x, where x: no of select lines(actually these are controller lines) n: No of inputs LOGIC DIAGRAM OF MULTIPLEXER 4 to 1 Multiplexer For understanding the multiplexer further, we are selecting a 4-to-1 Multiplexer. There are many others like 2-to-1, 8-to-1, 16-to-1 multiplexers etc. In this multiplexer, the details are the following: Inputs As the name indicates, there are 4 input bits. They are D 0 , D 1 , D 2 and D 3 . Output The number of output is one and is referred as Y. Control Bits Two control bi

MOST SIGNIFICANT BIT AND LEFT SIGNIFICANT BIT

  MSB stands for most significant bit, while LSB is least significant bit . In binary terms, the MSB is the bit that has the greatest effect on the number, and it is the left-most bit. For example, for a binary number 0011 0101, the Most Significant 4 bits would be 0011. The Least Significant 4 bits would be 0101.

BOOLEAN DATA TYPE IN C AND C++

Image
A boolean is a data type in the C Standard Library which can store true or false . Every non-zero value corresponds to true while 0 corresponds to false . The boolean works as it does in C++. However, if you don’t include the header file​ stdbool.h , the program will not compile. Another option is to define our own data type using typedef , which takes the values true and false :  typedef enum {false, true} bool; However, it is safer to rely on the standard boolean in stdbool.h .    Examples 1. Using the header file stdbool.h   include   < stdio.h > #include   < stdbool.h > int  main ()   {    bool  x  =   false ;    if ( x ){     printf ( "x is true." );    }    else {     printf ( "x is false." );    } }              USING TYPEDEF       #include   < stdio.h > typedef   enum   { false ,   true }   bool ; int  main ()   {    bool  x  =   false ;    if ( x ){     p

QUESTIONS ON TIME COMPLEXITY

Image