Thursday, 18 February 2016

CPU - Block Diagram of Computer



Explain block diagram of computer with all its components.
Answer:

There are five main component of computer.

1)      Input Device
2)      CPU
3)      Primary Memory
4)      Secondary Memory
5)      Output Device


Block diagram of computer is shown below.

 


1)      Input Device:
·         Input device is used to get the data from user.
·         All the data from input devices must be entered into Primary Memory.
·         When user enters data through keyboard, which are into user language must be converted into binary language.
·         So, Input device is bridge between user and computer.
·         Example: keyboard, mouse, scanner, joy stick, light pen etc.

2)      CPU:
·         CPU – Central Processing Unit
·         It is the brain of computer.
·         CPU is divided into two main parts.
I)                    ALU
II)                  CU
CPU = ALU + CU
 I)                    ALU – Arithmetic & Logical Unit

·         As the name suggest it is used to perform arithmetic and logical operation on data which is come from primary memory (RAM).
·         Data is processed on ALU and generate the result which is again transfer from ALU to RAM.

II)                  CU – Control Unit
·         This unit does not take part into any calculation or operation.
·         As the name, it is used to control the devices like input device, output device and primary memory.

3)      Primary Memory:
All the data, whether it will from input device or from secondary memory must come into primary memory.
There are two types of primary memory:
I)                    RAM
II)                  ROM

I)                    RAM:
·         RAM – Random Access Memory
·         It is volatile memory.
·         We can say that RAM is temporary storage unit and can’t store data permanent.
·         All the data from input device or from secondary memory must come into RAM.
·         When we turn off the system all the data are erased from RAM.

II)                  ROM:
·         ROM – Read Only Memory
·         As name we can’t write any data into ROM, we can just read the data from ROM.
·         It is non-volatile memory.
·         ROM can store data permanently.
·         It contains the different details of manufactures, version etc.
4)      Secondary Memory:



·         It is non volatile memory, so can store data permanently.
·         When result is generated by ALU and if want to store result permanently, then we can store such data into secondary memory.
·         Ex. HDD – Hard Disk Drive, Flash Drive, CD, DVD etc.
·         Operating System is also store into secondary memory.
 

5) Output Device:
·         It is used to display the result generated by CPU.
·         Again result generated by computer is in binary form, so need to convert this data into user language.
·         Ex. Monitor, Printer, Plotter etc.



Algorithm to find greatest number from 3 numbers

Algorithm is finite sequence of solution of problem given to programming language.
We can write algorithm in step wise and use our own lanaguge to give step.


Step 1: Input a,b,c

Step 2: Check if a>b is true then goto step 3 otherwise goto step 8

Step 3: Check if a>c is true then goto step 4 otherwise goto step 6

Step 4: Print a is max

Step 5: stop

Step 6: Print c is max

Step 7: stop

Step 8: Check if b>c is true then goto step 9 otherwise goto step 11

Step 9: Print b is max

Step 10: stop

Step 11: Print c is max

Step 12: stop

Tuesday, 16 February 2016

CPU - Computer Programming & Utilization_Material


Dear Students,

Now you can download the material of Computer Programming & Utilization (CPU - 2110003) subject offer by GTU: 

Stay connected to the blog for more materials related to CPU

Click Here! Download Chapter 2....

Sunday, 14 February 2016

Computer Programming Utilization (GTU) - Material

Hello All,

You can view the material of Computer Programming & Utilization with give below link:

This subject is offered in GTU in semester 1 & 2.

Regulary visit the blog and get the further material of remaining chapter.


Click Here!! Download Chapter 1

Friday, 12 February 2016

Computer Programming & Utilization - 2110003 GTU - MCQs

Multiple Choice Questions-
1) The C language consists of ____ number of keywords.
A] 32
B] 40
C] 24
D] 56

2) Which function is used to read character as you type ?
A] getchar()
B] getch()
C] getche()
D] Both (B) and (C)

3) What is the output of this program ?
void main()
{
              int a=b=c=10;
              a=b=c=50;
              printf(“\n %d %d %d”,a,b,c);
}
A] 50 50 50
B] Compile Time Error
C] 10 10 10
D] Three Gaebage Value

4) Which format specifier is used to print the values of double type variable
A]%If
B]%Id
C]%Iu
D] %f

5) What will be the output of the following program?
void main ( )
{
           double x=28;
           int r;
           r= x%5;
           printf (“\n r=%d”, r);
}
A] r= 3
B] Run time Error
C]Compile time Error

6) Which of the following is not s keyword of ‘C’ ?
A] auto
B] register
C] int
D] function

7) Explicit type conversion is known as
A] conversion
B] disjunction
C] separation
D] casting

8) What will be the output ?
#define SQUARE(X) X * X
void main ( )
{
                printf (“\n Square = %d” , SQUARE(10+2) );
}
A] Square = 144
B] Square =32
C] Square =122
D]Square =12

9) A declaration float a,b; occcupies ______of memory ?
A] 1 bytes B] 4bytes C] 8byte D] 16 bytes

10) Which of the following language is predecessor to C
Programming Language?
A] A
B]B
C] BCPL
D]C++
D]None of the Above