- A computer is an electronic machine that processes raw data to give information as output.
- An electronic device that accepts data as input, and transforms it under the influence of a set of special instructions called Programs, to produce the desired output (referred to as Information).
- A computer is described as an electronic device because; it is made up of electronic components and uses electric energy (such as electricity) to operate.
- A computer has an internal memory, which stores data & instructions temporarily awaiting processing, and even holds the intermediate result (information) before it is communicated to the recipients through the Output devices.
- Speed:Computers are fast in doing calculations. The speed of the computer is measured in terms of million instruction per second (MIPS).
- Storage Capacity: Computers come with large amount of memory. They can hold lot of data. Computers can show a particular piece of information from large amount of data in a short time.
- Diligence: After doing work for sometime, humans become tired but computers do not become tired. They work continuously. In fact, some computers which control telephone exchanges are never stopped. This is called diligence.
- Accuracy: The results that the computers produce are accurate provided data and programs are reliable.
- Versatility: We can use computer to perform completely different type of work at the same time.
- Reliability: Computers work for many years without any problem. Few computers in the world are never switched off.
1.1 Introduction
1.2 Characteristics of Computers
1.3 Block diagram of computer
fig 1.1 Block diagram of computer
- Take the data to be processed by the user.
- Convert the given data into machine-readable form.
- And then, transmit the converted data into the main memory of the computer.
- Central Processing Unit or the CPU, is the brain of the computer. As the brain controls all human activities, the CPU too controls all tasks.
- Moreover, the CPU conducts all the arithmetical and logical operations in the computer.
- Now the CPU comprises of two units, namely – ALU (Arithmetic Logic Unit) and CU (Control Unit). Both of these units work in sync. The CPU processes the data as a whole.
- 1. Data inserted through the input unit into the primary memory. Performs the basic arithmetical operation on it. Like addition, subtraction, multiplication, and division. It performs all sorts of calculations required on the data. Then sends back data to the storage.
- 2. The unit is also responsible for performing logical operations like, AND, OR, Equal to, Less than, etc. In addition to this it conducts merging, sorting, and selection of the given data.
- The control unit as the name suggests is the controller of all the activities/tasks and operations. All this is performed inside the computer.
- The memory unit sends a set of instructions to the control unit. Then the control unit in turn converts those instructions. After that these instructions are converted to control signals.
- These control signals help in prioritizing and scheduling the activities.
Input
All the data received by the computer goes through the input unit. The input unit comprises different devices. Like a mouse, keyboard, scanner, etc. In other words, each of these devices acts as a mediator between the users and the computer. The data that is to be processed is put through the input unit. The computer accepts the raw data in binary form. It then processes the data, and produces the desired output. The 3 major functions of the input unit are-
CPU: Central Processing Unit
ALU: Arithmetic Logic Unit
The Arithmetic Logic Unit is made of two terms, arithmetic and logic. There are two major functions that this unit performs.
CU: Control Unit
Memory Unit
All the data that has been processed is stored in the memory unit. The memory unit acts as a hub of all the data. This helps in faster accessing and processing of the data.
- This type of memory cannot store a vast amount of data. Therefore, it is only used to store recent data.
- The data stored in this is temporary. It can get erased once the power is switched off.
- Therefore, is also called temporary memory or the main memory. RAM stands for Random Access Memory. It is an example of primary memory.
- This memory is directly accessible by the CPU. It is used for reading and writing purposes.
- For data to be processed, it has to be first transferred to the RAM and then to the CPU.
- As explained above, the primary memory stores temporary data. Thus it cannot be accessed in the future.
- For permanent storage purposes, secondary memory is used.
- It is also called the permanent memory or the auxiliary memory.
- The hard disk is an example of secondary memory. Even in a power failure data does not get erased easily.
Primary memory:
Secondary memory:
- A minicomputer is also known as mini.
- It is a class of small computers that was introduced into the world in the mid-1960s. A minicomputer is a computer which has all the features of a large size computer, but its size is smaller than those.
- A minicomputer lies between the mainframe and the microcomputer because its size is smaller than the former one and larger than the latter one.
- A minicomputer is also called as a mid-range computer.
- Minicomputers are mainly multi-users systems where more than one user can work simultaneously. Mini computer examples: IBM’s AS/400e, Honeywell200, TI-990.
- It is smaller in size than a mainframe computer.
- It is less expensive than a super and mainframe computer.
- It is not much more powerful than the mainframe and supercomputer, but powerful than microcomputers.
- It supports multiprocessing and multi-tasking.
- It can be used by small organizations and individuals.
- Microcomputer is also known as a personal computer.
- It is a general-purpose computer that is designed for individual use.
- It has a microprocessor as a central processing unit, memory, storage area, input unit and output unit.
- Laptops and desktop computers are examples of microcomputers.
- They are suitable for personal work that may be making an assignment, watching a movie, or at office for office work.
- It is the smallest in size among all types of computers.
- A limited number of software can be used.
- It is designed for personal work and applications. Only one user can work at a time.
- It is less expansive and easy to use.
- It does not require the user to have special skills or training to use it.
- Generally, comes with single semiconductor chip.
- It is capable of multitasking such as printing, scanning, browsing, watching videos, etc.
- It can process huge amount of data, e.g. millions of transactions in a second in the banking sector.
- It has a very long life. It can run smoothly for up to 50 years after proper installation.
- It gives excellent performance with large scale memory management.
- It has the ability to share or distribute its workload among other processors and input/output terminals.
- There are fewer chances of error or bugs during processing in mainframe computers. If any error occurs it can fix it quickly without affecting the performance.
- It has the ability to protect the stored data and other ongoing exchange of information and data.
- Machine language is a low-level language made up of binary numbers or bits that a computer can understand
- It is also known as machine code or object code and is extremely tough to comprehend.
- The only language that the computer understands is machine language.
- All programs and programming languages, such as Swift and C++, produce or run programs in machine language before they are run on a computer.
- When a specific task, even the smallest process executes, machine language is transported to the system processor.
- Computers are only able to understand binary data as they are digital devices.
- When the programs code is compiled, it is converted into 01001000 01100101 01101100 01101100 01101111 00100000 01010111 01101111 01110
- An assembly language is a type of low-level programming language that is intended to communicate directly with a computer’s hardware.
- Unlike machine language, which consists of binary and hexadecimal characters, assembly languages are designed to be readable by humans.
- Low-level programming languages such as assembly language are a necessary bridge between the underlying hardware of a computer and the higher-level programming languages—such as Python or JavaScript—in which modern software programs are written.
- High-level languages are designed to be used by the human operator or the programmer.
- They are referred to as "closer to humans." In other words, their programming style and context is easier to learn and implement than low-level languages, and the entire code generally focuses on the specific program to be created.
- BASIC, C/C++ and Java are popular examples of high-level languages.
Output
There is nothing to be amazed by what the output unit is used for. All the information sent to the computer once processed is received by the user through the output unit. Devices like printers, monitors, projector, etc. all come under the output unit.
1.4 Types of computers and features
1.4.1 Mini Computers
Characteristics of Minicomputer
The minicomputer has the following characteristics:
1.4.2 Micro Computers
Characteristics of a microcomputer:
1.4.3 Mainframe Computers
Mainframe computers are designed to support hundreds or thousands of users simultaneously. They can support multiple programs at the same time. It means they can execute different processes simultaneously. These features of mainframe computers make them ideal for big organizations like banking and telecom sectors, which need to manage and process high volume of data
Characteristics of Mainframe Computers:
1.4.4 Super Computers
Supercomputer, any of a class of extremely powerful computers. The term is commonly applied to the fastest high-performance systems available at any given time. Such computers have been used primarily for scientific and engineering work requiring exceedingly high-speed computations. Common applications for supercomputers include testing mathematical models for complex physical phenomena or designs, such as climate and weather, evolution of the cosmos, nuclear weapons and reactors, new chemical compounds (especially for pharmaceutical purposes), and cryptology.
1.5 Types of Programming Languages
1.5.1 Machine Languages
1.5.2 Assembly Languages
1.5.3 High Level Languages
- File is nothing but a collection of information.
- The information can be of numbers, characters, graphs, images, etc.
- Every file should be stored under a unique name for its future reference.
- Every file should be saved along with an extension.
- Directory is a place/area/location where a set of file(s) will be stored.
- It is a folder which contains details about files, file size and time when they are created and last modified.
- Root Directory is created when we start formatting the disk and start putting files on it.
- In this, we can create new directories called "sub-directories".
- Root directory is the highest level directory and is seen when booting a system.
1.6 Data Organization
Data organization, in broad terms, refers to the method of classifying and organizing data sets to make them more useful. Some IT experts apply this primarily to physical records, although some types of data organization can also be applied to digital records.
1.6.2 Files
Some of the extensions and their description are given below −
Sr.No. | Extension & Description |
---|---|
1 | .avi -Microsoft videos for Windows movie |
2 | .doc(x) -Microsoft word for windows |
3 | .dbf -dbase II, III, IV data file |
4 | .gif -Graphics Interchange Format |
5 | .html -Hypertext Markup Language |
6 | .jpg -JPEG graphics file |
7 | .mpg -MPEG video file |
8 | .midMIDI music file |
9 | .movQuickTime movie |
1.6.3 Directories
Directory Management
The different types of directories are discussed below −
Root Directory
Subdirectory
Subdirectory is a directory inside root directory, in turn, it can have another sub-directory in it.
- The language we use to communicate with each other is comprised of words and characters. We understand numbers, characters and words. But this type of data is not suitable for computers.
- Computers only understand the numbers.When we enter data, the data is converted into electronic pulse.
- Each pulse is identified as code and the code is converted into numeric format by ASCII. It gives each number, character and symbol a numeric value (number) that a computer understands. So to understand the language of computers, one must be familiar with the number systems.
- Binary number system
- Octal number system
- Decimal number system
- Hexadecimal number system
1.7 Number Systems
The Number Systems used in computers are:
- It has only two digits '0' and '1' so its base is 2.
- Accordingly, In this number system, there are only two types of electronic pulses; absence of electronic pulse which represents '0'and presence of electronic pulse which represents '1'.
- Each digit is called a bit.
- A group of four bits (1101) is called a nibble and group of eight bits (11001010) is called a byte.
- The position of each digit in a binary number represents a specific power of the base (2) of the number system.
1.7.1 Introduction to Binary, Octal, Hexadecimal system
Binary number system
- It has eight digits (0, 1, 2, 3, 4, 5, 6, 7) so its base is 8.
- Each digit in an octal number represents a specific power of its base (8).
- As there are only eight digits, three bits (23=8) of binary number system can convert any octal number into binary number.
- This number system is also used to shorten long binary numbers. The three binary digits can be represented with a single octal digit.
Octal number system
- This number system has 16 digits that ranges from 0 to 9 and A to F. So, its base is 16. The A to F alphabets represent 10 to 15 decimal numbers.
- The position of each digit in a hexadecimal number represents a specific power of base (16) of the number system. As there are only sixteen digits, four bits (24=16) of binary number system can convert any hexadecimal number into binary number.
- It is also known as alphanumeric number system as it uses both numeric digits and alphabets.
Hexadecimal number system
- Divide 23 by 2: Quotient: 11 Remainder: 1
- Divide the quotient (11) by 2 again: Quotient: 5 Remainder: 1
- Divide the new quotient (5) by 2 again: Quotient: 2 Remainder: 0
- Divide the new quotient (2) by 2 again: Quotient: 1 Remainder: 1
- Finally, divide the last quotient (1) by 2: Quotient: 0 Remainder: 1
1.7.2 Conversion
1. Decimal to Binary
Converting a decimal number to binary involves dividing the decimal number by 2 repeatedly and keeping track of the remainders.
Here's a step-by-step example of how to convert the decimal number 23.25 to binary:
Start with the decimal number you want to convert, which is 23.
Now, read the remainders from bottom to top: 11001.
Convert the fractional part (0.25) to binary:
For the fractional part, you can multiply it by 2 repeatedly, and the integer part of the result becomes the next binary digit. Repeat this process until the fractional part becomes 0 or until you have obtained the desired number of binary digits.
0.25 × 2 = 0.5 Binary digit: 0
0.5 × 2 = 1.0 Binary digit: 1
Since the fractional part became 0 after obtaining 2 binary digits, stop the process.
Putting it all together:
Integer part (23) in binary: 10111
Fractional part (0.25) in binary: 01
So, the binary representation of the decimal number 23.25 is 10111.01.
2. Binary to Decimal
Converting a binary number to decimal involves multiplying each binary digit by the appropriate power of 2 and then summing up the results.
Here's a step-by-step example of how to convert the binary number 11001.011 to decimal:
1. Convert the integer part (11001) to decimal:
Start by multiplying each binary digit by 2 raised to the power of its position and summing up the results.
1 * 2^4 = 16
1 * 2^3 = 8
0 * 2^2 = 0
0 * 2^1 = 0
1 * 2^0 = 1
Summing up the results gives you the decimal value of the integer part: 16 + 8 + 0 + 0 + 1 = 25.
2. Convert the fractional part (011) to decimal:
For the fractional part, you can convert each binary digit to decimal and then sum up the values.
0 * 2^-1 = 0.0
1 * 2^-2 = 0.25
1 * 2^-3 = 0.125
Summing up the results gives you the decimal value of the fractional part: 0.0 + 0.25 + 0.125 = 0.375.
Putting it all together:
Integer part (11001) in decimal: 25
Fractional part (011) in decimal: 0.375
So, the decimal equivalent of the binary number 11001.011 is 25.375.
3. Decimal to Octal
Converting a decimal number with a fractional part to octal involves separately converting the integer and fractional parts.
Here's how you can convert the decimal number 23.25 to octal:
Convert the integer part (23) to octal:
Start by repeatedly dividing the integer part by 8 and keeping track of the remainders. Read the remainders in reverse order to get the octal representation.23 ÷ 8 = 2 remainder 7
2 ÷ 8 = 0 remainder 2
Reading the remainders in reverse order gives you the octal representation of the integer part: 27.
Convert the fractional part (0.25) to octal:
For the fractional part, you can multiply it by 8 repeatedly, and the integer part of the result becomes the next octal digit. Repeat this process until the fractional part becomes 0 or until you have obtained the desired number of octal digits.0.25 × 8 = 2.0 Octal digit: 2
Since the fractional part became 0 after obtaining 1 octal digit, stop the process.
Putting it all together:
Integer part (23) in octal: 27
Fractional part (0.25) in octal: 2
So, the octal representation of the decimal number23.25 is 27.2.
4. Octel to Decimal
Converting an octal number with a fractional part to decimal involves converting the integer and fractional parts separately.
Let's convert the octal number 37.27 to decimal:
Convert the integer part (37) to decimal:Start by multiplying each octal digit by 8 raised to the power of its position and summing up the results.
3 * 8^1 = 24
7 * 8^0 = 7
Summing up the results gives you the decimal value of the integer part: 24 + 7 = 31.
Convert the fractional part (0.27) to decimal:
For the fractional part, you can convert each octal digit to decimal and then sum up the values.
Copy code 0 * 8^-1 = 0.0
2 * 8^-2 = 0.25
7 * 8^-3 = 0.0546875
Summing up the results gives you the decimal value of the fractional part: 0.0 + 0.25 + 0.0546875 = 0.3046875.
Putting it all together:
Integer part (37) in decimal: 31
Fractional part (0.27) in decimal: 0.3046875
So, the decimal equivalent of the octal number 37.27 is 31.3046875.
5. Binary to HexaDecimal
To convert from Binary to Hexadecimal, start grouping the bits in groups of 4 from the right-end and write the equivalent hexadecimal for the 4-bit binary. Add extra 0’s on the left to adjust the groups.
E.g.
1111011011
0011 1101 1011
(001111011011)2 = (3DB)16
6. Hexadecimal to Binary
To convert from Hexadecimal to Binary, write the 4-bit binary equivalent of hexadecimal.
E.g:
(3A)16 = (00111010)2
1.7.3 Arithmatic Operation in binary number
1. Binary Addition
Binary addition is similar to decimal addition, but it operates using the base-2 number system instead of the base-10 system. In binary addition, you add binary digits (0 or 1) from right to left, carrying over any extra 1 when the sum of digits in a column exceeds 1.
Rules:
Example
- Step 1: Find the 1's complement of the subtrahend, which means the second number of subtraction.
- Step 2: Add it with the minuend or the first number.
- Step 3: If there is a carryover left then add it with the result obtained from step 2.
- Step 4: If there are no carryovers, then the result obtained in step 2 is the difference of the two numbers using 1's complement binary subtraction.
- Step 1: Find out the 1's complement of the subtrahend (37), which is 0110102.
- Step 2: Add it with the minuend(50), which is 1100102.
- Step 3: Arrange the numbers as follows and add them.
- Step 4: The left-most digit 1 is a carryover of this addition. Since there is a carryover we add it with the result, which is 0011002.
2. Binary Subtraction
Rules:
Binary Subtraction Using 1's Complement
The 1's complement of a number is obtained by interchanging every 0 to 1 and every 1 to 0 in a binary number. For example, the 1's complement of the binary number1102 is 0012.To perform binary subtraction using 1's complement, please follow the steps mentioned below:
Example
Subtract 1100102 - 1001012 using 1's complement. Here the binary equivalent of 50 is 1101012 and the binary equivalent of 37 is 1001012.
3. Binary Multiplication
Binary multiplication is similar to decimal multiplication. It is simpler than decimal multiplication because only 0s and 1s are involved.
No comments:
Post a Comment