Chapter 1 - Computer System (Notes)
Chapter 1 - Computer System (Notes)
r
Learning Outcomes :
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
Hardware Software
Storage
1.1 System Concept
Storage
INPUT
INPUT
PROCESS
✔ Transforming data
into information.
1.1 System Concept
PROCESS
OUTPUT
OUTPUT
STORAGE
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 :
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
computer recognizes
only two discrete
electrical states
(on and off)
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 digit
110
Binary numbers
1.2 Number System and Representation
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
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
64 +
Hence, 0+ 16 + = 8
1011100 92+ 4+ 0+ 0=
10
Binary to decimal conversion
1.2 Number System and Representation
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
Example 1:
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
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
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
Example 2:
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
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
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
Example 3:
Solution:
Divide the given decimal number by 2
Decimal to binary
conversion
1.2 Number System and Representation
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
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 :
✔ Describe how
1.3
computers encode
characters using ASCII
INFORMATION (8 bits), EBCDIC,
CODING Unicode
SCHEME
1.3 Information Coding Scheme
Introduction
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
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.
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
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?
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?
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 :
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
gate
• Changes one logic level to the opposite level.
• Assume A is input and Y is output, symbol of NOT
gate is:
gate
• Truth table:
A Y=A
gate
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
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
gate
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
gate
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
gate
gate
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
gate
gate
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)