Basics of Computer System

A Computer System is an integrated electronic device. It Consists of following main components :-

1. Central Processing Unit (Brain of the computer)

  • Arithmetic & Logic Unit
  • Control Unit 
  • Memory Unit

2. Input Devices (Keyboard, Mouse etc.)

3. Output Devices (Monitor, Speaker, Printer etc.)

These components are working together to give a desired output to the user in return of an input.

User gives an input to the computer system using any input device like keyboard, mouse etc. in form of user friendly code. This information is transfer to the Central Processing Unit and then converted into binary format in 0's and 1's (known as the machine code). 

The Central Processing Unit processes the input data, understands the requirement by user and performs the desired operation. 

Then CPU transfers the output to the Output Device. The output is provide to the user in user friendly form by the output device e.g. on the monitor, speaker etc.



                                                     

1. Block Diagram of a Computer System



2. A Typical CPU



3. RAM (Random Access Memory)





4. A Western Digital External Hard Disk Drive


Central Processing Unit is the main part of the computer system. It has following three main units :-

  • Arithmetic & Logic Unit (or ALU)
  • Control Unit
  • Memory Unit    

These components are explained below in detail :-

  1. Arithmetic & Logic Unit - This part of the CPU is responsible for all mathematical calculations and logic operations. It takes the data from the control unit, perform desired operation and then return the data to the control unit.
  2. Control Unit - This unit is responsible for the management of all the operations performed by ALU and Memory Unit. It takes care of all the input/output operations. It generates the sequence of the signals to perform various operations.
  3. Memory Unit - This is the data bank of the CPU. It stores the data supplied by the control unit in memory registers and provide it to the control unit whenever ALU required.

Few generally used peripheral devices that can be part of the computer system are:-

  • UPS (Uninterrupted Power Supply)  - Used to backup the computer system to avoid accidentally switch off of the computer system, when the main power breakdown suddenly.
  • Desktop Camera - To use the camera for any video purpose.
  • External Hard Drive or SSD Drive or USB Drive - Permanent memory storage or non-volatile memory storage
  • Microphone
  • Scanner
  • CD/DVD Reader/Writer etc.

You might have question in mind, how a computer understand the input given to it by a user?
If you have this question then it is good, otherwise you should know about it to understand more about the computer and its working to use it for large applications.

Don't worry, because from now you will know it ✌.

As we all know, computer is an electronic device. CPU's brain part is Motherboard, which has integrated circuits for ALU, Control Unit and Memory unit (RAM & Cache). It contains electronic components as its body parts. It means it will understand any input in form of voltage or current. Computer, understand the input data with respect to voltage in form of levels defined for electronic components (e.g. Various Transistors ) on motherboard.

There are basically 2 voltage levels - Low voltage and High Voltage. 
If the voltage is low, it means '0' and if voltage is High, it means '1' for computer.
Everything computer read, process or write is in the form of combinations of  0's and 1's.

This form of data representation is called as Binary Number System.

To handle all the basic operation in computer e.g. manage computer hardware and software resources and provide common service, a software is used which is known as Operating System.


Operating System

It is the main software responsible for all basic operations of the computer. It enabled user to interact with the hardware. It manages all the common services (i.e. managing and handling activities) and resources. There are various type of operating systems available. Mostly used operating systems are:

1. Microsoft Windows
2. Unix
3. Linux 
4. Mac OS
5. Android

Linux Distribution:- A Linux distribution is an operating system which include the Linux Kernel within the software collections. 

Various Linux distribution are :
  • Linux Mint
  • Ubuntu 
  • Fedora
  • Debian
  • CentOS
  • Kali Linux etc.
Ubuntu is the most commonly used Linux distribution.

The most important functions of the Operating System are :-
  • Act as an interface between the user and computer hardware.
  • Memory and Processor management.
  • File and Device management.
  • Scheduling of resources and processes.
  • Error detection in component functionality.
  • Security of the system resources.

The various types of Operating System are :
  • Batched Operating System (e.g. Transactions Process, etc.)
  • Multi-Programmed Operating System (e.g. Windows, UNIX, LINUX, MacOS, etc.)
  • Time-Sharing Operating System (e.g. Multics, etc.)
  • Distributed Operating System (e.g. Locus etc. )
  • Real-Time Operating System (e.g. PSOS, VRTX, etc.)

Bootloader :- 
A bootloader is a small program that runs when a device is powered on or reset, and is responsible for loading and starting the main operating system or application. There are many factors to consider when writing a bootloader such as memory layout, memory protection, security, error handling, etc. Typical minimal operations done in a custom bootloader are as follows:

1. Disable interrupts: interrupts should be disabled before copying the application code from flash to RAM, to ensure that the application is not interrupted during this process.

2. Copy the application code from flash to RAM: The bootloader copies the application code from its location in flash memory to RAM memory using pointer arithmetic. Start and end addresses of the application code are loaded from respective variables from a linker file.

3. Jump to the application entry point: The bootloader then jumps to the entry point of the application, which is the first instruction in the application code. This is done by casting the address of the entry point to a function pointer, and calling the function.

4. Infinite loop: If something went wrong and the application failed to start, the bootloader enters an infinite loop.


Related Post: 

Comments

Popular posts from this blog

Setting up a USB thermal printer with a Raspberry Pi 3B+

Autostart an app on reboot - Raspberry Pi

Basic Input/Output C Program