0% found this document useful (0 votes)
203 views96 pages

Chapter 1 - Computer System (Notes)

1011100 = 92 in decimal Binary to decimal conversion

Uploaded by

Fatin Farhanah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
203 views96 pages

Chapter 1 - Computer System (Notes)

1011100 = 92 in decimal Binary to decimal conversion

Uploaded by

Fatin Farhanah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 96

Compute

r
Learning Outcomes :

Explain the operations

1.1
involved in information
processing cycle

SYSTEM i. Input
ii. Process
CONCEPT iii. Output
iv. Storage
1.1 System Concept

What is Computer?
An electronic device that accepts data
(input), process data, produces
information (output) and store the
information for future use.
1.1 System Concept

What is Computer System?


A complete, working computer that
includes operating system,
software and hardware which are
necessary to make the computer
function.
1.1 System Concept
Components of Computer System

Hardware Software

Input Devices System Software

System Unit Operating


System
Output Devices Utility Program

Storage Devices Application


Software
1.1 System Concept
Input-Process-Output-Storage (IPOS)
Model or Information Processing Cycle

Input Process Output

Storage
1.1 System Concept
Storage

Input Process Output


1.1 System Concept

INPUT

✔ Any data or instruction entered


into the memory of a computer.
1.1 System Concept

INPUT

✔ User can enter data and instructions into


a computer by using input devices
(keyboard, mouse, touch screen, game
controller, scanner etc).
1.1 System Concept

PROCESS

✔ Transforming data
into information.
1.1 System Concept

PROCESS

✔ Performing operation on the data such as


performing calculations, sorting lists of
words or numbers, drawing pictures.
✔ Processing data makes the data entered
usable.
1.1 System Concept

OUTPUT

✔ Data that has been processed


into a useful form (information).
1.1 System Concept

OUTPUT

✔ An output is when the computer


communicates the results of the
processed data.
✔ The information is usually shown on a
display monitor or paper printout and it
should be easy for us to understand.
1.1 System Concept

STORAGE

✔ Location in which data,


instructions and information are
held for future use.
1.1 System Concept
There are four main steps in Information Processing Cycle. Explain what are the input,
process, output and storage when you are given information 2+5=7 to be processed.

1. INPUT : 2. PROCESS:
User enter 2 and 5 using keyboard Computer adds 2 and
into the memory of computer. 5.

7
3. OUTPUT : 4.STORAGE:
Computer displays Computer saves the
the results ,7 at the monitor. data and information for future use.
Learning Outcomes :

1.2 ✔ Explain data


representation in
Number
System computer (Bit , Byte)
and
Representation
1.2 Number System and Representation

Data Information
Collection of ✔ Processed data that
unprocessed items, conveys meaning
which can include and is useful to
number, character and people.
symbol, images, audio,
video and instructions.
Example: name, father’s Example: receipt,
name, mark, unedited average marks, result of
video and video , raw semester one, student’s
picture. carry marks, video clips,
full song, poster, banner,
book cover
1.2 Number System and Representation

Example Data Information


My Score on the
Example 1 95 subject Sains
Computer is 95.
RM10000 X 25% =
RM2500,
Aiman is a
Example 2 Aiman, 10000,
salesman who
25 earned RM10000
sales for this month
and receives 25%
commission which
is rm2500
1.2 Number System and Representation

How does a computer represent data?

❑ By using two unique binary digits 1 and 0 to


represent the two states on and off.

computer recognizes
only two discrete
electrical states
(on and off)
1.2 Number System and Representation

Data Representation in Computer


Bit Byte
▪ A bit is the smallest ▪ A byte is 8 bits that
unit of data the are group together as
computer can process. a unit.
1.2 Number System and Representation

Data Representation in Computer


Bit Byte
▪ Short for binary digit ▪ (example:11110000)
(1 or 0) ▪ Is the basic storage
▪ Represents an unit in memory.
electrical state (on or ▪ Represents a
off) character such as a
▪ Bit 1 represents On digit, a letter, a
▪ Bit 0 represents Off punctuation mark or
any symbol in
computer
1 byte = 8 bits
▪ 1 byte could be equal
to 1 character.
1.2 Number System and Representation

Example :

00110100 represents 4

00110110 represents 6

01000101 represents E
How a letter is converted to binary form and back

Step 1. Step 2.
The user An electronic
presses the signal for the
capital capital letter D is
letter D on sent to the system
the unit.
keyboard.

Step 4. Step 3.
After processing, the The signal for the capital letter
binary code for the capital D is converted to its binary code
letter D is converted to an (01000100) and is stored in
image, and displayed on memory for processing.
the monitor.
Learning Outcomes :

✔ Convert between

1.2
binary and decimal
whole numbers
Number (0 - 255)
System
and
Representation
1.2 Number System and Representation

Number System

A set of numerals
for representing numbers
1.2 Number System and Representation

Number System

Binary Number System (base 2)

Decimal Number System (base 10)

Octal Number System (base 8)

Hexadecimal Number System (base 16)


1.2 Number System and Representation

Binary Number System


▪ just
Binary is a base 2 number system that has
two unique digits, 0 and 1, called bits.

Binary digit

110
Binary numbers
1.2 Number System and Representation

Decimal Number System


▪ Is a base 10 number system
(deci means ten).
▪ Familiar use in everyday life.
▪ Consists of numbers 0-9.
▪ Decimal digits are joined together to form
longer decimal numbers
▪ Example: 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11……
DECIMAL BINARY
0 0
1 1
Comparison 2 10

between 3
4
11
100
decimal 5 101
number 6 110

system 7 111
8 1000
and 9 1001

binary 10 1010
11 1011
number 12 1100
system 13 1101
14 1110
15 1111
16 10000
1.2 Number System and Representation

Binary to Decimal Number System conversion

Since the binary system is the internal


language of electronic computers,
serious computer programmers
should understand how to convert
from binary to decimal.
1.2 Number System and Representation

Binary to Decimal Number System conversion

⚫ In binary number, the column weights (again from


right to left) are as follows:

(23) (22) (21) (20)


8 4 2 1
1.2 Number System and Representation

Binary to Decimal Number System conversion


Example 1:
⚫ Convert the binary number system 10110 to decimal number
system
Solution:

25 24 23 22 21 20
32 16 8 4 2 1

1 0 1 1 0
22
16 x 1 8x 4x1 2x1 1x0
0
16 + 0+ 4+ 2+ 0=
Hence, 10110 = 2210 Binary to decimal conversion
1.2 Number System and Representation

Binary to Decimal Number System conversion


Example 2:
• Convert the binary number system 1011100 to decimal number
system
Solution:
26 25 24 23 22 21 20
64 32 16 8 4 2 1
1 0 1 1 1 0 0
64 x 1 32 x 16 x 8x 4x 2x0 1x0 92
0 1 1 1

64 +
Hence, 0+ 16 + = 8
1011100 92+ 4+ 0+ 0=
10
Binary to decimal conversion
1.2 Number System and Representation

Binary to Decimal Number System conversion


Example 3:
• Convert the binary number system 1110110 to decimal number
system
Solution:

26 25 24 23 22 21 20
64 32 16 8 4 2 1
1 1 1 0 1 1 0
64 x 1 32 x 16 x 8x 4x 2x1 1x0 118
1 1 0 1

Hence,
64 + 321110110
+ 16 += 0118
+ 104 + 2 + 0=
Binary to decimal conversion
1.2 Number System and Representation

Decimal Number System

Decimal is a term that describes the


base-10 number system, probably the
most commonly used number system.
The decimal number system consists
of ten single- digit numbers: 0, 1, 2,
3, 4, 5, 6, 7, 8, and 9
1.2 Number System and Representation

Decimal Number System

• Also known as the base 10 numbering system


• How 615 is represented in decimal numbers

102 101 100


6 x 100 1 x 10 5x1
600 + 10 + 5 =
61510
1.2 Number System and Representation

Decimal to Binary Number System conversion

Example 1:

⚫ Convert the number 22 to the binary


number system

Solution:
Desired base is 2, so we repeatedly
divide the given decimal number by 2.

Decimal to binary
conversion
1.2 Number System and Representation

Decimal to Binary Number System conversion

2 2
2 Solution
2 1 ---- 0 (Method 1)
1
2 5 ---- 1

2 ---- 1 Binary
2
numbe
2 1 ---- 0 r

0 ---- 1
Hence, 22 = 101102
1.2 Number System and Representation

Decimal to Binary Number System conversion

Solution
(Method 2)
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
22
1 0 1 1 0
Hence, 22 = 101102
2
1.2 Number System and Representation

Decimal to Binary Number System conversion

Example 2:

⚫ Convert the number 40 to the binary


number system

Solution:
Desired base is 2, so we repeatedly
divide the given decimal number by 2.

Decimal to binary
conversion
1.2 Number System and Representation

Decimal to Binary Number System conversion

2 4 Solution
2 0
2 (Method 1)
---- 0
0 ---- 0
2 1
0 ---- 0
2 5 Binary
2 2 ---- 1 numbe
2 1 r
---- 0
0 ---- 1
Hence, 40 = 1010002
1.2 Number System and Representation

Decimal to Binary Number System conversion

Solution
(Method 2)
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
40
0 0 1 0 1 0 0 0

Hence, 40 = 1010002
2
1.2 Number System and Representation

Decimal to Binary Number System conversion

Example 3:

⚫ Express 18 in binary number form

Solution:
Divide the given decimal number by 2

Decimal to binary
conversion
1.2 Number System and Representation

Decimal to Binary Number System conversion

2 1
Solution
2 8
9 ---- (Method 1)
2 4 0
----
2 2 1
----
2 1 0
---- Binary
numbe
0 0
---- r
1
Hence, 18 = 100102
2 Decimal to binary
conversion
1.2 Number System and Representation

Decimal to Binary Number System conversion

Solution
(Method 2)
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
18
0 0 0 1 0 0 1 0

Hence, 18 = 100102
2
Learning Outcomes :

1.2 ✔ Describe why


Number
hexadecimal notation
System is used
and
Representation
1.2 Number System and Representation

Hexadecimal Number System

• Uses 16 symbols to represents values :


0,1,2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.

• Hexadecimal number system is used with


computer because:
i. It can represent binary values in more
compact and readable form.
ii. The conversion between the binary and the
hexadecimal number system is very efficient.

• 9B4 is example of hexadecimal number system.


2.2.2 Hexadecimal Number System
Hexadecimal Digit Decimal Equivalent Binary Equivalent
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111
Learning Outcomes :

✔ Describe how

1.3
computers encode
characters using ASCII
INFORMATION (8 bits), EBCDIC,
CODING Unicode
SCHEME
1.3 Information Coding Scheme

Definition of Coding scheme:

The combinations of 0s and 1s that


represent uppercase and lowercase
letters, numbers and special symbols.

Discovering Computers 2016


Shelly Cashman Series
1.3 Information Coding Scheme

Introduction

• These characters include numbers,


uppercase and lowercase letters of the
alphabet, punctuation marks, and others,
such as the letters of the Greek alphabet.

• Coding schemes make it possible for


humans to interact with a digital
computer that processes only bits.
1.3 Information Coding Scheme

3 popular coding systems to represent data :


1.3 Information Coding Scheme

• Three popular coding systems to represent


data :
❑ ASCII
(American Standard Code for Information
Interchange)
❑ EBCDIC
(Extended Binary Coded Decimal Interchange
Code)
❑ Unicode
(Uniform code capable of representing all world’s
languages)
1.3 Information Coding Scheme

ASCII
⚫ The American Standard Code for Information Interchange
(ASCII) is widely used in computers of all types.
⚫ ASCII codes are of two types :
ASCII-7 ( Basic ) and ASCII-8 ( Extended ).

ASCII-7 ASCII-8
is a 7-bit standard is an extended
ASCII code version of ASCII-7
In ASCII-7, the first ASCII-8 is an 8-bit
3 bits are the zone code having 4 bits
bits and the next 4 for zone and 4 bits
bits are for the digits. for the digit.
1.3 Information Coding Scheme

ASCII
ASCII - 7 ASCII - 8
Basic Extended
7-bit standard ASCII code is an extended version of
ASCII-7
first 3 bits are the zone first 4 bits are the zone
bits bits
the next 4 bits are for the digits.
000 0000 0000 0000

Zone
Digits
1.3 Information Coding Scheme

WHAT TYPE OF ASCII


THAT YOU USE NOW?

ASCII - 8
1.3 Information Coding Scheme

WHY ASCII – 8?

is an extended version of
ASCII-7
1.3 Information Coding Scheme

EBCDIC
• The Extended Binary Coded Decimal
Interchange Code (EBCDIC) uses 8 bits
• (4 bits for zone, 4 bits for digit) to
represent a symbol in the data.

00000000
Zone Digit
• EBCDIC allows 2
8
= 256 combinations of bits. s
1.3 Information Coding Scheme

EBCDIC
256 unique symbols are represented using
EBCDIC code.

It represents decimal numbers (0-9),


lower case letters (a-z), uppercase letters (A-Z),
special characters, and control characters (printable
and non-printable e.g. for cursor movement, printer
vertical spacing etc.).

EBCDIC codes are used, mainly, in the


mainframe computers.
1.3 Information Coding Scheme

Unicode
Unicode is a 16-bit coding
scheme that has the capacity of
representing all the world’s
current languages, as well as
classic and historical languages, in
more than 65,000 characters and
symbols.
1.3 Information Coding Scheme

Unicode
Unicode is a universal character
encoding standard for the representation
of text which includes letters, numbers and
symbols in multi-lingual environments.
Unicode codes can uniquely represent
any character or symbol present in any
language like Chinese, Japanese etc.
1.3 Information Coding Scheme

Differences between 3 popular coding


systems
ASCII EBCDIC Unicode
Use 8 bits to Use 8 bits to used 16 bits to
represent a represent a represent a
character character character
Can represent Can represent capable to
256 characters 256 characters represent more
(28 = 256) (28 = 256) than 65000
characters
primarily used on primarily used on Implemented in
PC and server mainframe and several
high end servers Operating
systems
(Windows, Mac
Learning Outcomes :

✔ Calculate the total

1.3
number of bits/bytes in
a given word based on
INFORMATION each coding scheme
CODING
SCHEME
1.3 Information Coding Scheme
How many bits would it take to
represent the following phrase using
the following codes?

COMPUTER SCIENCE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16
ASCII : 16 x 8 = 128bits
EBCDIC : 16 x 8 = 128bits
Unicode : 16 x 16 = 256bits
1.3 Information Coding Scheme
How many bits would it take to
represent the following phrase using
the following codes?
12 3 45678
“SC 015”
1 2 3 45
12 3 4 5 6 789

ASCII : 8 x 8 =
64bits
Unicode
EBCDIC :: 88 x16
x8=
1.3 Information Coding Scheme
How many bits would it take to
represent the following phrase using
the following codes?

‘7 eleven’
ASCII : 10 x 8 = 80bits
EBCDIC : 10 x 8 = 80bits
Unicode : 10x16 = 160bits
1.3 Information Coding Scheme
How many bits would it take to
represent the following phrase using
the following codes?

I WANT TO BE A COMPUTER GENIUS.

ASCII : 31 x 8 = 248bits
EBCDIC : 31 x 8 = 248bits
Unicode : 31 x16 = 496bits
1.3 Information Coding Scheme
How many bytes would it take to represent
the following phrase using the following
codes?

I WANT TO BE A COMPUTER GENIUS.

ASCII : 31 x 1 = 31 bytes
EBCDIC : 31 x 1 = 31 bytes
Unicode : 31 x 2 = 62 bytes
1.3 Information Coding Scheme
How many bytes would it take to represent
the following phrase using the following
codes?

‘7 eleven’
ASCII : 10 x 1 = 10 bytes
EBCDIC : 10 x 1 = 10 bytes
Unicode : 10 x 2 = 20 bytes
1.3 Information Coding Scheme
How many bytes would it take to represent
the following phrase using the following
codes?

“SC 015”
ASCII : 8 x 1 = 8 bytes
EBCDIC : 8 x 1 = 8 bytes
Unicode : 8 x 2 = 16 bytes
1.3 Information Coding Scheme
How many bytes would it take to represent
the following phrase using the following
codes?

COMPUTER SCIENCE

ASCII : 16 x 1 = 16 bytes
EBCDIC : 16 x 1 = 16 bytes
Unicode : 16 x 2 = 32 bytes
Learning Outcomes :

✔ Identify logical operators

1.4
(AND, OR, NOT) and
symbols (gate) used to
represent each of the
Logic Gate operators (AND, OR, NOT)
and
Simple
Logic Circuit
1.4 Logic Gate and Simple Logic Circuit

Introduction

⚫ The basic rules for simplifying and combining


logic gates are called Boolean algebra in
honour of George Boole (1815-1864).
⚫ There are two types of operator:
1.4 Logic Gate and Simple Logic Circuit

There are three basic logic gates.


1.4 Logic Gate and Simple Logic Circuit

gate
• Changes one logic level to the opposite level.
• Assume A is input and Y is output, symbol of NOT
gate is:

• Boolean expression for NOT gate:


1.4 Logic Gate and Simple Logic Circuit

gate

• Truth table:

A Y=A

False (0) True (1)

True (1) False (0)


1.4 Logic Gate and Simple Logic Circuit

gate

• Produce True (1) output when all of the inputs are


True (1).
• Produce False (0) output when any of the inputs are
False (0).
• Assume A & B are inputs and Y is output, symbol
of AND gate is:
1.4 Logic Gate and Simple Logic Circuit

gate
• Boolean expression:

• Truth table:
A B Y=A.B
False (0) False (0) False (0)
False (0) True (1) False (0)
True (1) False (0) False (0)
True (1) True (1) True (1)
1.4 Logic Gate and Simple Logic Circuit

gate

• Produce True (1) output when any of the inputs are


True (1).
• Produce False (0) output when all of the inputs are
False (0).
• Assume A & B are inputs and Y is output, symbol
of OR gate is:
1.4 Logic Gate and Simple Logic Circuit

gate
• Boolean expression:

• Truth table:
A B Y=A+B
False (0) False (0) False (0)
False (0) True (1) True (1)
True (1) False (0) True (1)
True (1) True (1) True (1)
Learning Outcomes :

✔ Identify combination of

1.4
different gates (NAND,
NOR, XOR, XNOR)
Logic Gate
and
Simple
Logic Circuit
1.4 Logic Gate and Simple Logic Circuit

gate

• Combination of AND and NOT gate


• Produce True (1) output when any of the inputs are
False (0).
• Produce False (0) output when all of the inputs are
True (1).
1.4 Logic Gate and Simple Logic Circuit

gate

• Assume A & B are inputs and Y is output, symbol


of NAND gate is:

or
1.4 Logic Gate and Simple Logic Circuit

gate
• Boolean expression:

• Truth table:
A B A.B Y = A .B
False (0) False (0) False (0) True (1)
False (0) True (1) False (0) True (1)
True (1) False (0) False (0) True (1)
True (1) True (1) True (1) False (0)
1.4 Logic Gate and Simple Logic Circuit

gate

• Combination of OR and NOT gate


• Produce True (1) output when all of the inputs are
False (0).
• Produce False (0) output when any of the inputs are
True (1).
1.4 Logic Gate and Simple Logic Circuit

gate

• Assume A & B are inputs and Y is output, symbol


of NOR gate is:

or
1.4 Logic Gate and Simple Logic Circuit

gate
• Boolean expression:

• Truth table:
A B A+B Y=A+B
False (0) False (0) False (0) True (1)
False (0) True (1) True (1) False (0)
True (1) False (0) True (1) False (0)
True (1) True (1) True (1) False (0)
1.4 Logic Gate and Simple Logic Circuit

gate

• The XOR gate (sometimes EOR gate, or EXOR


gate and pronounced as Exclusive OR gate)
• Is a digital logic gate that gives a true (1 or HIGH)
output when the number of true inputs is odd.
• An XOR gate implements an exclusive or; that is,
a true output results if one, and only one, of the
inputs to the gate is true.
1.4 Logic Gate and Simple Logic Circuit

gate

• If both inputs are false (0 or LOW) or both are true,


a false output results.
• XOR represents the inequality function, example
the output is true if the inputs are not alike
otherwise the output is false.
• A way to remember XOR is "one or the other but
not both".
1.4 Logic Gate and Simple Logic Circuit

gate

• Assume A & B are inputs and Y is output, symbol


of XOR gate is:
1.4 Logic Gate and Simple Logic Circuit

gate
A . B + A . B OR
• Boolean expression:

• Truth table:
(A + B) . (A + B)
A B
False (0) False (0) False (0)
False (0) True (1) True (1)
True (1) False (0) True (1)
True (1) True (1) False (0)
1.4 Logic Gate and Simple Logic Circuit

gate

• The XNOR gate (often written Exclusive-NOR,


sometimes: EXNOR, ENOR, and, rarely, NXOR,
XAND)
• Is a digital logic gate whose function is the logical
complement of the exclusive OR (XOR) gate.
1.4 Logic Gate and Simple Logic Circuit

gate

• The two-input version implements logical equality,


behaving according to the truth table to the right,
and hence the gate is sometimes called an
"equivalence gate".
• A high output (1) results if both of the inputs to the
gate are the same. If one but not both inputs are
high (1), a low output (0) results.
1.4 Logic Gate and Simple Logic Circuit

gate

• Assume A & B are inputs and Y is output, symbol


of XNOR gate is:

Y
1.4 Logic Gate and Simple Logic Circuit

gate
• Boolean expression:
Y = A +B
• Truth table:
A B
False (0) False (0) True (1)
False (0) True (1) False (0)
True (1) False (0) False (0)
True (1) True (1) True (1)

You might also like