CPIT-201 | Introduction to computing

Get Started. It's Free
or sign up with your email address
CPIT-201 | Introduction to computing by Mind Map: CPIT-201 | Introduction to computing

1. CH-1 | Introduction

1.1. Turning model

1.1.1. described by Alan Turing in 1937

1.1.2. He proposed that all computation could be performed by (Turing machine)

1.2. Data processors

1.2.1. a computer acts as a black box that accepts input data processes the data output data

1.3. Programmable data processors

1.3.1. the program A program is a set of instructions that tells the computer what to do with data Instructions are written in a computer language. Output data depends on the input data and the program

1.4. VON NEUMANN Model

1.4.1. Intro since program and data are logically the same, programs should also be stored in the memory of a computer.

1.4.2. divide the computer hardware into four subsystems: memory arithmetic logic unit ontrol unit input/output

1.4.3. The Stored Program Concept early computers did not store the program in the computer’s memory, von Neumann model states that the program must be stored in memory.

1.4.4. Figure -Memory is the storage area where data and program is stored -ALU is where calculation and logical operation take place. -CU controls the operations of memory, ALU and I/O devices -Input subsystem accepts input and the program from outside. -Output subsystem sends the result of processing to outside,

1.4.5. Program and data in memory Both the data and programs should have the same format because they are stored in memory as binary pattern

1.4.6. Sequential execution of instructions Today’s computers execute programs in the order that is the most efficient.

1.5. Computer components

1.5.1. computer hardware We will discuss computer hardware in more detail in Chapter 5.

1.5.2. data von Neumann model clearly defines a computer as a data processing machine that accepts the input data, processes it, and outputs the result.

1.5.3. computer software.

1.6. history of computing

1.6.1. Mechanical machines (before 1930) Pascaline Leibnitz’ Wheel Jacquard loom

1.6.2. electronic computers (1930–1950) computers of this period did not store the program in memory—all were programmed externally. Five computers were prominent during these years ABC Z1 Mark I. Colossus ENIAC Computer generations (1950–present) First generation 1950–1959 Second generation 1959–1965 Third generation 1965-1975 Fourth generation 1975–1985 Fifth generation 1985-now

1.7. Social and ethical issues

1.7.1. Social issues Dependency Social justice Digital divide

1.7.2. Ethical issues Privacy Copyright Computer crime

1.8. Computer science as a discipline

1.8.1. computer science has now divided into two broad categories: systems areas applications areas

2. CH-2 | Data Representation

2.1. Number system

2.1.1. Positional system The decimal system (base 10) S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} The binary system (base 2) S = {0, 1} The hexadecimal system (base 16) S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F} The octal system (base 8) S = {0, 1, 2, 3, 4, 5, 6, 7} Summery

2.1.2. Non-positional system non-positional number systems are not used in computers uses a limited number of symbols in which each symbol has a value the position a symbol occupies in the number normally bears no relation to its value—the value of each symbol is fixed

2.2. Bit pattern

2.2.1. All data types are represented using universal format called bit pattern

2.2.2. A Bit (binary digit) is the smallest unit of data that can be stored in a computer; it is either 0 or 1

2.2.3. An electronic switch can represent a bit.

2.2.4. Data are coded when they enter the computer and decoded when they are represented to user.

2.3. Text

2.3.1. Each symbol can be represented by a bit pattern

2.3.2. TEXT such as BYTE can be represented as 4 bit pattern

2.4. Number

2.4.1. hexadecimal (base 16) 4-bit pattern

2.4.2. octal (base 8) 3-bit pattern

2.5. Image

2.5.1. Bitmap Bitmap graphic method divides an image into pixels

2.5.2. Vector image because an image represented using a mathematical formula

2.6. Audio

2.6.1. Sampling Measure value of signal at equal intervals

2.6.2. Quantization Assign a value from a set to a sample

2.6.3. Coding Store converted binary pattern

2.7. Video

2.7.1. Representing the video is like combination in representing the Images and the Audio

3. CH-3 | Number Representation

3.1. Range of integers

3.1.1. Integers are whole numbers (i.e. numbers without fraction). An integer can be positive or negative ranges No computer can store all the integers in this range because a computer does not have an infinite storage capability the range of integers depends on the number of bits that a computer allocates to store an integer

3.2. Integer Representation

3.2.1. Unsigned representation An unsigned integer is an integer that can never be negative This means it represents positive integers. No bit is allocated for the sign. Range: 0 ….. (2^N – 1) where N is the number of bits allocated to represent an Integer. What is overflow ? Overflow is an error that occurs if one try to store a number that is not within the range defined by the allocation. Applications of unsigned integers: Counting Addressing storing other data types

3.2.2. Signed integers Sign and Magnitude There are two 0s in sign-and-magnitude representation: positive and negative. the leftmost bit defines the sign of the integer Applications One’s Complement There are two 0s in one’s complement representation: positive and negative. In one’s complement representation, the leftmost bit defines the sign of the number Applications: Two’s Complement There is only one zero in Two complement Two’s complement is the most common, the most important, and the most widely used representation of integers today because it has only one representation for 0 and thus does not create confusion in calculation In two’s complement representation, the leftmost bit defines the sign of the number Applications:

3.3. Summary of integer representation

3.3.1. Sign and Magnitude and One’s complement are not used to store signed numbers by computers today because there are two 0s which confuse programmers.

3.3.2. Sign and Magnitude method is used mainly for applications that do not need operations on numbers e.g. addition, subtraction,..) For example, changing the analog signals to digital signals.

3.4. Excess system

3.4.1. This representation can be used to store positive and negative numbers but operations on them are very difficult

3.4.2. It is used mainly to store the exponential value of a fraction

3.4.3. It depends on a magic number 2^N-1 or 2^N-1 -1

3.4.4. The way of using Excess_127 is: Decimal to binary add 127 to the number then convert to binary Binary to decimal convert binary to decimal then subtract 127

3.5. Floating point representation

3.5.1. A floating point number contains an integer part and a fraction part.

3.5.2. Integer part is converted to binary as usual but fraction part needs special treatment.

3.5.3. Normalization Normalization means moving the decimal point so that there is only 1 to the left of the decimal point. To indicate the original value of the number, multiply the number by 2^e where e is the number of bits that the decimal Points moved;

4. Operations on Bits

4.1. Arithmetic

4.1.1. Adding numbers in 2’s Complement is like adding numbers in decimal; one add column by column, and if there is A carry, it is added to the next column.

4.2. Logical

4.2.1. Bit values 0 and 1 can be interpreted as logical values such as true for 1 false for 0.

4.2.2. Unary and binary Logical operations can be applied on logical values represented by bits.

4.2.3. Logical operator Truth table Unary NOT Binary AND OR XOR

4.2.4. Mask The AND, OR, and XOR can be used to modify (set or unset) a bit pattern. The mask is used to modify another bit pattern. Example of (unsetting) specific bits Use AND operator to unset (forces to 0) bits. To unset a bit in the target, use 0 in the corresponding bit in the mask. Otherwise, to leave a bit unchanged, use 1 in the corresponding bit in the mask. Example of (setting) specific bits Use OR operator to set (forces to 1) bits. To set a bit in the target, use 1 in the corresponding bit in the mask. Otherwise, to leave a bit unchanged, use 0 in the corresponding bit in the mask. Example of flipping specific bits Use XOR operator to flip bits (0 become1 and 1 becomes 0) To flip a bit in the target, use 1 in the corresponding bit in the mask Otherwise, to leave a bit unchanged, use 0 in the corresponding bit in the mask.