際際滷

際際滷Share a Scribd company logo
Introduction to Information and Communication Technologies
Data types
? Numeric Data consists of only numbers 0, 1, 2, ´, 9
? Alphabetic Data consists of only the letters A, B, C,
? ´, Z, in both uppercase and lowercase, and blank
character
? Alphanumeric Data is a string of symbols where a symbol
may be one of the letters A, B, C, ´, Z, in either uppercase or
lowercase, or one of the digits 0, 1, 2, ´, 9, or a special
character, such as + - * / , . () = etc.
? Computer codes are used for internal representation of
data in computers
? As computers use binary numbers for internal data
representation, computer codes use binary
coding schemes
? In binary coding, every symbol that appears in the data
is represented by a group of bits
? The group of bits used to represent a symbol is called
a byte ( 8 bits)
Computer Codes
How computer represent data
? Information is handled in a computer by electronic/
electrical components
? Electronic components operate in binary mode (can only indicate two
states C on (1) or off (0)
? Binarynumbersystemhas only two digits (0 and 1), and is suitable for
expressing two possible states
? In binary system, computer circuits only have to handle two binary digits
rather than ten decimal digits causing:
? Simpler internal circuit design
? Less expensive
? More reliable circuits
? Arithmetic processes are possible with binary numbers
Binary over Decimal
Examples of a Few Devices that work in
Binary Mode
Bits and bytes
Binary digits---bits
A byte comprises of 8 bits
and represents 1 character
. computer codes
? As most modern coding schemes use 8 bits to
represent a symbol, the term byte is often used to
mean a group of 8 bits
? Commonly used computer codes are BCD, EBCDIC, and
ASCII
Computer Codes
BCD
? BCD stands for Binary Coded Decimal
? It is one of the early computer codes
? It uses 4 bits or 6 bits to represent a symbol
? It can represent 64 (26) different characters
BCD by 4 bits
? BCD converts each digit of a decimal number into its
binary equivalent rather than converting the entire
decimal value into a pure binary form
? With 4 bits, altogether 16 (24) configurations are
possible
? Example:
1.4210
? It is equal to 1010102 in a pure binary form.
? 4210 = 01000010 in BCD as 4= 0100 and 2=0010
Binary Coded Decimal (BCD)
1001 0011 1000 in BCD = 938
8 4 2 1
1 0 0 1
8 + 0 + 0 + 1
9
8 4 2 1
0 0 1 1
0 + 0 + 2 + 1
3
8 4 2 1
1 0 0 0
8 + 0 + 0 + 0
8
BCD by 4 bits
Activity
Convert 70910 to binary and BCD
Convert 82110 to binary and BCD
BCD by 4 bits
Convert 70910 to binary and BCD
? binary form=10110001012
? BCD=011100001001 as 7= 0111, 0=0000 and
9=1001
Activity
Convert the BCD number 10011.0101 to decimal.
BCD by 4 bits
? Example:
? Convert the BCD number 1 0011.0101 to decimal.
? Solution:
We have
=0001 0011 . 0101
=13.5
BCD by 4 bits
? BCD encodes each decimal digit with its binary
equivalent using four bits. So decimal digits are simply
represented in four bits by their direct binary values.
? A disadvantage of this is that only 10 of the possible
16 (24) codes that four bits can produce are used.
Hence it is an inefficient code. Nevertheless, the
advantages usually outweigh this disadvantage
BCD by 6 bits
? Four BCD numeric place positions are retained, but two
additional zone positions are added.
? With 6 bits, 64 (26) different characters are possible.
? decimal digits (10), alphabetic letters (26), and other
special characters (28)
Coding of Alphabetic and Numeric Characters in
BCD
Character
BCD Code Octal
Equivalent
Zone Digit
1 00 0001 01
2 00 0010 02
3 00 0011 03
4 00 0100 04
5 00 0101 05
6 00 0110 06
7 00 0111 07
8 00 1000 10
9 00 1001 11
0 00 1010 12
Coding of Alphabetic and Numeric Characters
in BCD
Char
BCD Code Octal
Zone Digit
A 11 0001 61
B 11 0010 62
C 11 0011 63
D 11 0100 64
E 11 0101 65
F 11 0110 66
G 11 0111 67
H 11 1000 70
I 11 1001 71
J 10 0001 41
K 10 0010 42
L 10 0011 43
M 10 0100 44
Char
BCD Code Octal
Zone Digit
N 10 0101 45
O 10 0110 46
P 10 0111 47
Q 10 1000 50
R 10 1001 51
S 01 0010 22
T 01 0011 23
U 01 0100 24
V 01 0101 25
W 01 0110 26
X 01 0111 27
Y 01 1000 30
Z 01 1001 31
Example
Show the binary digits used to record the word BASE in BCD
Solution:
B = 110010 in BCD binary notation
A = 110001 in BCD binary notation
S = 010010 in BCD binary notation
E = 110101 in BCD binary notation
So the binary digits
110010 110001 010010 110101
B A S E
will record the word BASE in BCD
BCD Coding Scheme (Example 1)
Example
Using octal notation, show BCD coding for the word DIGIT
Solution:
D = 64 in BCD octal notation
I = 71 in BCD octal notation
G = 67 in BCD octal notation
I = 71 in BCD octal notation
T = 23 in BCD octal notation
Hence, BCD coding for the word DIGIT in octal notation will be
64 71 67 71 23
D I G I T
BCD Coding Scheme (Example 2)
? EBCDIC stands for Extended Binary Coded Decimal
Interchange Code
? It uses 8 bits to represent a symbol
? It can represent 256 (28) different characters
EBCDIC
Computer Fundamentals: Pradeep K. Sinha & Priti Sinha
Standard Code for? ASCII stands for American
Information Interchange.
and can
and can
? ASCII is of two types C ASCII-7 and ASCII-8
? ASCII-7 uses 7 bits to represent a symbol
represent 128 (27) different characters
? ASCII-8 uses 8 bits to represent a symbol
represent 256 (28) different characters
? First 128 characters in ASCII-7 and ASCII-8 are same
ASCII
Character
ASCII-7 / ASCII-8 Hexadecimal
EquivalentZone Digit
0 0011 0000 30
1 0011 0001 31
2 0011 0010 32
3 0011 0011 33
4 0011 0100 34
5 0011 0101 35
6 0011 0110 36
7 0011 0111 37
8 0011 1000 38
9 0011 1001 39
Coding of Numeric and Alphabetic Characters
in ASCII
Character
ASCII-7 / ASCII-8 Hexadecimal
EquivalentZone Digit
A 0100 0001 41
B 0100 0010 42
C 0100 0011 43
D 0100 0100 44
E 0100 0101 45
F 0100 0110 46
G 0100 0111 47
H 0100 1000 48
I 0100 1001 49
J 0100 1010 4A
K 0100 1011 4B
L 0100 1100 4C
M 0100 1101 4D
Coding of Numeric and Alphabetic Characters
in ASCII
Character
ASCII-7 / ASCII-8 Hexadecimal
EquivalentZone Digit
N 0100 1110 4E
O 0100 1111 4F
P 0101 0000 50
Q 0101 0001 51
R 0101 0010 52
S 0101 0011 53
T 0101 0100 54
U 0101 0101 55
V 0101 0110 56
W 0101 0111 57
X 0101 1000 58
Y 0101 1001 59
Z 0101 1010 5A
Coding of Numeric and Alphabetic Characters
in ASCII
Example
How many bytes are requiredWrite binary coding for the word BOY in ASCII-7.
for this representation?
Solution:
B = 1000010 in ASCII-7 binary notation
O = 1001111 in ASCII-7 binary notation
Y = 1011001 in ASCII-7 binary notation
Hence, binary coding for the word BOY in ASCII-7 will be
1000010 1001111 1011001
B O Y
Since each character in ASCII-7 requires one byte for its representation and
there are 3 characters in the word BOY, 3 bytes will be required for this
representation
ASCII-7 Coding Scheme
Example
How many bytes areWrite binary coding for the word SKY in ASCII-8.
required for this representation?
Solution:
S = 01010011 in ASCII-8 binary notation
K = 01001011 in ASCII-8 binary notation
Y = 01011001 in ASCII-8 binary notation
Hence, binary coding for the word SKY in ASCII-8 will be
01010011 01001011 01011001
S K Y
Since each character in ASCII-8 requires one byte for its representation
and there are 3 characters in the word SKY, 3 bytes will be required for
this representation
ASCII-8 Coding Scheme
? Why Unicode:
? No single encoding system supports all languages
? Different encoding systems conflict
? Unicode features:
? Provides a consistent way of encoding multilingual
plain text
? Defines codes for characters used in all major
languages of the world
? Defines codes for special characters or mathematical
symbols
? With Unicode 65,000 (216) different characters can be
represented.
Unicode
Difference

More Related Content

What's hot (20)

4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257
MdFazleRabbi18
?
Basic computer organization and design
Basic computer organization and designBasic computer organization and design
Basic computer organization and design
mahesh kumar prajapat
?
CSA PPT UNIT 1.pptx
CSA PPT UNIT 1.pptxCSA PPT UNIT 1.pptx
CSA PPT UNIT 1.pptx
sukhpreetsingh295239
?
Bcd
BcdBcd
Bcd
Talha Fazal
?
Error Detection N Correction
Error Detection N CorrectionError Detection N Correction
Error Detection N Correction
Ankan Adhikari
?
Codes
CodesCodes
Codes
Muhammad Uzair Rasheed
?
Boolean algebra simplification and combination circuits
Boolean algebra simplification and combination circuitsBoolean algebra simplification and combination circuits
Boolean algebra simplification and combination circuits
Jaipal Dhobale
?
Basic of number system
Basic of number systemBasic of number system
Basic of number system
Akhilesh Maithani
?
Computer-codes.pptx
Computer-codes.pptxComputer-codes.pptx
Computer-codes.pptx
PraveenThabbannavar
?
Binary codes
Binary codesBinary codes
Binary codes
ZareenRauf1
?
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
BalamuruganV28
?
Control Function - Computer Architecture
Control Function - Computer ArchitectureControl Function - Computer Architecture
Control Function - Computer Architecture
Adeel Rasheed
?
Digital Data to Digital Signal Conversion
Digital Data to Digital Signal ConversionDigital Data to Digital Signal Conversion
Digital Data to Digital Signal Conversion
Arafat Hossan
?
Storage classes in c language
Storage classes in c languageStorage classes in c language
Storage classes in c language
tanmaymodi4
?
8085 Interfacing with I/O Devices or Memory
8085 Interfacing with I/O Devices or Memory8085 Interfacing with I/O Devices or Memory
8085 Interfacing with I/O Devices or Memory
Saumay Paul
?
Representation of Integers
Representation of IntegersRepresentation of Integers
Representation of Integers
Susantha Herath
?
Parallel Adder and Subtractor
Parallel Adder and SubtractorParallel Adder and Subtractor
Parallel Adder and Subtractor
Smit Shah
?
Design of Accumulator Unit
Design of Accumulator UnitDesign of Accumulator Unit
Design of Accumulator Unit
Harshad Koshti
?
Data Input and Output
Data Input and OutputData Input and Output
Data Input and Output
Sabik T S
?
 Laboratorio de Microcomputadoras - Pr│ctica 05 Laboratorio de Microcomputadoras - Pr│ctica 05
Laboratorio de Microcomputadoras - Pr│ctica 05
Cristian Ortiz G┏mez
?
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257
MdFazleRabbi18
?
Error Detection N Correction
Error Detection N CorrectionError Detection N Correction
Error Detection N Correction
Ankan Adhikari
?
Boolean algebra simplification and combination circuits
Boolean algebra simplification and combination circuitsBoolean algebra simplification and combination circuits
Boolean algebra simplification and combination circuits
Jaipal Dhobale
?
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
BalamuruganV28
?
Control Function - Computer Architecture
Control Function - Computer ArchitectureControl Function - Computer Architecture
Control Function - Computer Architecture
Adeel Rasheed
?
Digital Data to Digital Signal Conversion
Digital Data to Digital Signal ConversionDigital Data to Digital Signal Conversion
Digital Data to Digital Signal Conversion
Arafat Hossan
?
Storage classes in c language
Storage classes in c languageStorage classes in c language
Storage classes in c language
tanmaymodi4
?
8085 Interfacing with I/O Devices or Memory
8085 Interfacing with I/O Devices or Memory8085 Interfacing with I/O Devices or Memory
8085 Interfacing with I/O Devices or Memory
Saumay Paul
?
Parallel Adder and Subtractor
Parallel Adder and SubtractorParallel Adder and Subtractor
Parallel Adder and Subtractor
Smit Shah
?
Design of Accumulator Unit
Design of Accumulator UnitDesign of Accumulator Unit
Design of Accumulator Unit
Harshad Koshti
?
Data Input and Output
Data Input and OutputData Input and Output
Data Input and Output
Sabik T S
?
 Laboratorio de Microcomputadoras - Pr│ctica 05 Laboratorio de Microcomputadoras - Pr│ctica 05
Laboratorio de Microcomputadoras - Pr│ctica 05
Cristian Ortiz G┏mez
?

Similar to . computer codes (20)

Binary codes
Binary codesBinary codes
Binary codes
GargiKhanna1
?
Digital Electronics Codes.pdf
Digital Electronics Codes.pdfDigital Electronics Codes.pdf
Digital Electronics Codes.pdf
PrasenjitKumarDas2
?
Lecture 5 binary_codes
Lecture 5 binary_codesLecture 5 binary_codes
Lecture 5 binary_codes
Kamran Zafar
?
Topic 2.3 (1)
Topic 2.3 (1)Topic 2.3 (1)
Topic 2.3 (1)
nabilbesttravel
?
Lecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptLecture_Computer_Codes.ppt
Lecture_Computer_Codes.ppt
MarlonMagtibay2
?
computercodes, BCD, EBCDIC,ASCII,UNICODE
computercodes, BCD, EBCDIC,ASCII,UNICODEcomputercodes, BCD, EBCDIC,ASCII,UNICODE
computercodes, BCD, EBCDIC,ASCII,UNICODE
dbmscse61
?
Codes r005
Codes  r005Codes  r005
Codes r005
arunachalamr16
?
9pL7F2E8XI0alXYT280.pptx
9pL7F2E8XI0alXYT280.pptx9pL7F2E8XI0alXYT280.pptx
9pL7F2E8XI0alXYT280.pptx
AnSHiKa187943
?
Code conversion r006
Code conversion r006Code conversion r006
Code conversion r006
arunachalamr16
?
Digital electronics- BCD & Decoder
Digital electronics- BCD & DecoderDigital electronics- BCD & Decoder
Digital electronics- BCD & Decoder
Pritam Shil
?
Number system
Number systemNumber system
Number system
Ashish Kumar Thakur
?
Lecture 2
Lecture 2Lecture 2
Lecture 2
Muuluu
?
Octal to binary and octal to hexa decimal conversions
Octal to binary and octal to hexa decimal conversionsOctal to binary and octal to hexa decimal conversions
Octal to binary and octal to hexa decimal conversions
Afrasiyab Haider
?
binarycodes.pdf
binarycodes.pdfbinarycodes.pdf
binarycodes.pdf
17111ASIFNOORJAMEE
?
Binary codes
Binary codesBinary codes
Binary codes
Neha Jamini
?
BCDCONVERTER.pptx
BCDCONVERTER.pptxBCDCONVERTER.pptx
BCDCONVERTER.pptx
MagedAldhaeebi
?
Applied physics iii lecture3 digital_codes
Applied physics iii lecture3 digital_codesApplied physics iii lecture3 digital_codes
Applied physics iii lecture3 digital_codes
Japhet Munnah
?
08. Numeral Systems
08. Numeral Systems08. Numeral Systems
08. Numeral Systems
Intro C# Book
?
BCD.
BCD.BCD.
BCD.
Meghana C M
?
Lecture 01
Lecture 01Lecture 01
Lecture 01
sohelranasweet
?

Recently uploaded (20)

Unit-2 Velocity and Acceleration Analysis (Relative Velocity Method).pptx
Unit-2 Velocity and Acceleration Analysis (Relative Velocity Method).pptxUnit-2 Velocity and Acceleration Analysis (Relative Velocity Method).pptx
Unit-2 Velocity and Acceleration Analysis (Relative Velocity Method).pptx
Kirankumar Jagtap
?
INFORMATION AND COMMUNICATION TECHNOLOGY SKILLS' SUFFICIENCY OF EGYPTIAN ACCO...
INFORMATION AND COMMUNICATION TECHNOLOGY SKILLS' SUFFICIENCY OF EGYPTIAN ACCO...INFORMATION AND COMMUNICATION TECHNOLOGY SKILLS' SUFFICIENCY OF EGYPTIAN ACCO...
INFORMATION AND COMMUNICATION TECHNOLOGY SKILLS' SUFFICIENCY OF EGYPTIAN ACCO...
ijait
?
Control of Volatile Organic Compounds (VOCs) - with example calculations.ppt
Control of Volatile Organic Compounds (VOCs) - with example calculations.pptControl of Volatile Organic Compounds (VOCs) - with example calculations.ppt
Control of Volatile Organic Compounds (VOCs) - with example calculations.ppt
ssuserb6ce69
?
Lecture 01s.pptxLecture 01s.pptxLecture 01s.pptx
Lecture 01s.pptxLecture 01s.pptxLecture 01s.pptxLecture 01s.pptxLecture 01s.pptxLecture 01s.pptx
Lecture 01s.pptxLecture 01s.pptxLecture 01s.pptx
FaheemAbbas82
?
lecture 4MORTAR for construction works(2).ppt
lecture 4MORTAR for construction works(2).pptlecture 4MORTAR for construction works(2).ppt
lecture 4MORTAR for construction works(2).ppt
SimeonWoyesa
?
lec1.pptx smartgrid fundamental datas presentation
lec1.pptx smartgrid fundamental datas presentationlec1.pptx smartgrid fundamental datas presentation
lec1.pptx smartgrid fundamental datas presentation
PandyselviBalasubram
?
芙坪茶氏Y創_Data-Centric AI in The Age of Large Language Models
芙坪茶氏Y創_Data-Centric AI in The Age of Large Language Models芙坪茶氏Y創_Data-Centric AI in The Age of Large Language Models
芙坪茶氏Y創_Data-Centric AI in The Age of Large Language Models
鰻粥京晦粥皆幄塀氏芙
?
AE- unit 4.ppt STEERING, BRAKES AND SUSPENSION SYSTEMS
AE- unit 4.ppt STEERING, BRAKES AND SUSPENSION SYSTEMSAE- unit 4.ppt STEERING, BRAKES AND SUSPENSION SYSTEMS
AE- unit 4.ppt STEERING, BRAKES AND SUSPENSION SYSTEMS
Dr.PERIASAMY K
?
?????????? ???????????? - Presented at the IEEE International Conference on B...
?????????? ???????????? - Presented at the IEEE International Conference on B...?????????? ???????????? - Presented at the IEEE International Conference on B...
?????????? ???????????? - Presented at the IEEE International Conference on B...
Partho Prosad
?
Building a Strong Portfolio for Your Software Engineering Career
Building a Strong Portfolio for Your Software Engineering CareerBuilding a Strong Portfolio for Your Software Engineering Career
Building a Strong Portfolio for Your Software Engineering Career
Navinda Dissanayake
?
J111111111111111111111111111111111111111query.pptx
J111111111111111111111111111111111111111query.pptxJ111111111111111111111111111111111111111query.pptx
J111111111111111111111111111111111111111query.pptx
dkmishra2407
?
Ethical Hacking Module 1 Notes by Hackopedia
Ethical Hacking Module 1 Notes by HackopediaEthical Hacking Module 1 Notes by Hackopedia
Ethical Hacking Module 1 Notes by Hackopedia
Hackopedia Utkarsh Thakur
?
Application of Artificial Neural Networks.pdf
Application of Artificial Neural Networks.pdfApplication of Artificial Neural Networks.pdf
Application of Artificial Neural Networks.pdf
JeveshMagnani
?
David Boutry - A Senior Software Engineer
David Boutry - A Senior Software EngineerDavid Boutry - A Senior Software Engineer
David Boutry - A Senior Software Engineer
David Boutry
?
Operations Management - Facility Location.pptx
Operations Management - Facility Location.pptxOperations Management - Facility Location.pptx
Operations Management - Facility Location.pptx
VirajPasare
?
study of impact behaviour of dual material for energy absorption
study of impact behaviour of dual material for energy absorptionstudy of impact behaviour of dual material for energy absorption
study of impact behaviour of dual material for energy absorption
AmitChauhan352669
?
NIS Unit-1(PPT)jbdjjdcbjbchdhbchbjch.pdf
NIS Unit-1(PPT)jbdjjdcbjbchdhbchbjch.pdfNIS Unit-1(PPT)jbdjjdcbjbchdhbchbjch.pdf
NIS Unit-1(PPT)jbdjjdcbjbchdhbchbjch.pdf
MohdKhalidShaikh2
?
Table Creation in HTML using <table> tag
Table Creation in HTML using  <table> tagTable Creation in HTML using  <table> tag
Table Creation in HTML using <table> tag
pravin patil
?
Public Transport _Project1_Presentation .pdf
Public Transport _Project1_Presentation .pdfPublic Transport _Project1_Presentation .pdf
Public Transport _Project1_Presentation .pdf
zyw2006
?
Lost and Found Hub Project slide System design
Lost and Found Hub Project slide System designLost and Found Hub Project slide System design
Lost and Found Hub Project slide System design
ABUDOJANA
?
Unit-2 Velocity and Acceleration Analysis (Relative Velocity Method).pptx
Unit-2 Velocity and Acceleration Analysis (Relative Velocity Method).pptxUnit-2 Velocity and Acceleration Analysis (Relative Velocity Method).pptx
Unit-2 Velocity and Acceleration Analysis (Relative Velocity Method).pptx
Kirankumar Jagtap
?
INFORMATION AND COMMUNICATION TECHNOLOGY SKILLS' SUFFICIENCY OF EGYPTIAN ACCO...
INFORMATION AND COMMUNICATION TECHNOLOGY SKILLS' SUFFICIENCY OF EGYPTIAN ACCO...INFORMATION AND COMMUNICATION TECHNOLOGY SKILLS' SUFFICIENCY OF EGYPTIAN ACCO...
INFORMATION AND COMMUNICATION TECHNOLOGY SKILLS' SUFFICIENCY OF EGYPTIAN ACCO...
ijait
?
Control of Volatile Organic Compounds (VOCs) - with example calculations.ppt
Control of Volatile Organic Compounds (VOCs) - with example calculations.pptControl of Volatile Organic Compounds (VOCs) - with example calculations.ppt
Control of Volatile Organic Compounds (VOCs) - with example calculations.ppt
ssuserb6ce69
?
Lecture 01s.pptxLecture 01s.pptxLecture 01s.pptx
Lecture 01s.pptxLecture 01s.pptxLecture 01s.pptxLecture 01s.pptxLecture 01s.pptxLecture 01s.pptx
Lecture 01s.pptxLecture 01s.pptxLecture 01s.pptx
FaheemAbbas82
?
lecture 4MORTAR for construction works(2).ppt
lecture 4MORTAR for construction works(2).pptlecture 4MORTAR for construction works(2).ppt
lecture 4MORTAR for construction works(2).ppt
SimeonWoyesa
?
lec1.pptx smartgrid fundamental datas presentation
lec1.pptx smartgrid fundamental datas presentationlec1.pptx smartgrid fundamental datas presentation
lec1.pptx smartgrid fundamental datas presentation
PandyselviBalasubram
?
芙坪茶氏Y創_Data-Centric AI in The Age of Large Language Models
芙坪茶氏Y創_Data-Centric AI in The Age of Large Language Models芙坪茶氏Y創_Data-Centric AI in The Age of Large Language Models
芙坪茶氏Y創_Data-Centric AI in The Age of Large Language Models
鰻粥京晦粥皆幄塀氏芙
?
AE- unit 4.ppt STEERING, BRAKES AND SUSPENSION SYSTEMS
AE- unit 4.ppt STEERING, BRAKES AND SUSPENSION SYSTEMSAE- unit 4.ppt STEERING, BRAKES AND SUSPENSION SYSTEMS
AE- unit 4.ppt STEERING, BRAKES AND SUSPENSION SYSTEMS
Dr.PERIASAMY K
?
?????????? ???????????? - Presented at the IEEE International Conference on B...
?????????? ???????????? - Presented at the IEEE International Conference on B...?????????? ???????????? - Presented at the IEEE International Conference on B...
?????????? ???????????? - Presented at the IEEE International Conference on B...
Partho Prosad
?
Building a Strong Portfolio for Your Software Engineering Career
Building a Strong Portfolio for Your Software Engineering CareerBuilding a Strong Portfolio for Your Software Engineering Career
Building a Strong Portfolio for Your Software Engineering Career
Navinda Dissanayake
?
J111111111111111111111111111111111111111query.pptx
J111111111111111111111111111111111111111query.pptxJ111111111111111111111111111111111111111query.pptx
J111111111111111111111111111111111111111query.pptx
dkmishra2407
?
Application of Artificial Neural Networks.pdf
Application of Artificial Neural Networks.pdfApplication of Artificial Neural Networks.pdf
Application of Artificial Neural Networks.pdf
JeveshMagnani
?
David Boutry - A Senior Software Engineer
David Boutry - A Senior Software EngineerDavid Boutry - A Senior Software Engineer
David Boutry - A Senior Software Engineer
David Boutry
?
Operations Management - Facility Location.pptx
Operations Management - Facility Location.pptxOperations Management - Facility Location.pptx
Operations Management - Facility Location.pptx
VirajPasare
?
study of impact behaviour of dual material for energy absorption
study of impact behaviour of dual material for energy absorptionstudy of impact behaviour of dual material for energy absorption
study of impact behaviour of dual material for energy absorption
AmitChauhan352669
?
NIS Unit-1(PPT)jbdjjdcbjbchdhbchbjch.pdf
NIS Unit-1(PPT)jbdjjdcbjbchdhbchbjch.pdfNIS Unit-1(PPT)jbdjjdcbjbchdhbchbjch.pdf
NIS Unit-1(PPT)jbdjjdcbjbchdhbchbjch.pdf
MohdKhalidShaikh2
?
Table Creation in HTML using <table> tag
Table Creation in HTML using  <table> tagTable Creation in HTML using  <table> tag
Table Creation in HTML using <table> tag
pravin patil
?
Public Transport _Project1_Presentation .pdf
Public Transport _Project1_Presentation .pdfPublic Transport _Project1_Presentation .pdf
Public Transport _Project1_Presentation .pdf
zyw2006
?
Lost and Found Hub Project slide System design
Lost and Found Hub Project slide System designLost and Found Hub Project slide System design
Lost and Found Hub Project slide System design
ABUDOJANA
?

. computer codes

  • 1. Introduction to Information and Communication Technologies
  • 2. Data types ? Numeric Data consists of only numbers 0, 1, 2, ´, 9 ? Alphabetic Data consists of only the letters A, B, C, ? ´, Z, in both uppercase and lowercase, and blank character ? Alphanumeric Data is a string of symbols where a symbol may be one of the letters A, B, C, ´, Z, in either uppercase or lowercase, or one of the digits 0, 1, 2, ´, 9, or a special character, such as + - * / , . () = etc.
  • 3. ? Computer codes are used for internal representation of data in computers ? As computers use binary numbers for internal data representation, computer codes use binary coding schemes ? In binary coding, every symbol that appears in the data is represented by a group of bits ? The group of bits used to represent a symbol is called a byte ( 8 bits) Computer Codes
  • 5. ? Information is handled in a computer by electronic/ electrical components ? Electronic components operate in binary mode (can only indicate two states C on (1) or off (0) ? Binarynumbersystemhas only two digits (0 and 1), and is suitable for expressing two possible states ? In binary system, computer circuits only have to handle two binary digits rather than ten decimal digits causing: ? Simpler internal circuit design ? Less expensive ? More reliable circuits ? Arithmetic processes are possible with binary numbers Binary over Decimal
  • 6. Examples of a Few Devices that work in Binary Mode
  • 7. Bits and bytes Binary digits---bits A byte comprises of 8 bits and represents 1 character
  • 9. ? As most modern coding schemes use 8 bits to represent a symbol, the term byte is often used to mean a group of 8 bits ? Commonly used computer codes are BCD, EBCDIC, and ASCII Computer Codes
  • 10. BCD ? BCD stands for Binary Coded Decimal ? It is one of the early computer codes ? It uses 4 bits or 6 bits to represent a symbol ? It can represent 64 (26) different characters
  • 11. BCD by 4 bits ? BCD converts each digit of a decimal number into its binary equivalent rather than converting the entire decimal value into a pure binary form ? With 4 bits, altogether 16 (24) configurations are possible ? Example: 1.4210 ? It is equal to 1010102 in a pure binary form. ? 4210 = 01000010 in BCD as 4= 0100 and 2=0010
  • 12. Binary Coded Decimal (BCD) 1001 0011 1000 in BCD = 938 8 4 2 1 1 0 0 1 8 + 0 + 0 + 1 9 8 4 2 1 0 0 1 1 0 + 0 + 2 + 1 3 8 4 2 1 1 0 0 0 8 + 0 + 0 + 0 8
  • 13. BCD by 4 bits
  • 14. Activity Convert 70910 to binary and BCD Convert 82110 to binary and BCD
  • 15. BCD by 4 bits Convert 70910 to binary and BCD ? binary form=10110001012 ? BCD=011100001001 as 7= 0111, 0=0000 and 9=1001
  • 16. Activity Convert the BCD number 10011.0101 to decimal.
  • 17. BCD by 4 bits ? Example: ? Convert the BCD number 1 0011.0101 to decimal. ? Solution: We have =0001 0011 . 0101 =13.5
  • 18. BCD by 4 bits ? BCD encodes each decimal digit with its binary equivalent using four bits. So decimal digits are simply represented in four bits by their direct binary values. ? A disadvantage of this is that only 10 of the possible 16 (24) codes that four bits can produce are used. Hence it is an inefficient code. Nevertheless, the advantages usually outweigh this disadvantage
  • 19. BCD by 6 bits ? Four BCD numeric place positions are retained, but two additional zone positions are added. ? With 6 bits, 64 (26) different characters are possible. ? decimal digits (10), alphabetic letters (26), and other special characters (28)
  • 20. Coding of Alphabetic and Numeric Characters in BCD Character BCD Code Octal Equivalent Zone Digit 1 00 0001 01 2 00 0010 02 3 00 0011 03 4 00 0100 04 5 00 0101 05 6 00 0110 06 7 00 0111 07 8 00 1000 10 9 00 1001 11 0 00 1010 12
  • 21. Coding of Alphabetic and Numeric Characters in BCD Char BCD Code Octal Zone Digit A 11 0001 61 B 11 0010 62 C 11 0011 63 D 11 0100 64 E 11 0101 65 F 11 0110 66 G 11 0111 67 H 11 1000 70 I 11 1001 71 J 10 0001 41 K 10 0010 42 L 10 0011 43 M 10 0100 44 Char BCD Code Octal Zone Digit N 10 0101 45 O 10 0110 46 P 10 0111 47 Q 10 1000 50 R 10 1001 51 S 01 0010 22 T 01 0011 23 U 01 0100 24 V 01 0101 25 W 01 0110 26 X 01 0111 27 Y 01 1000 30 Z 01 1001 31
  • 22. Example Show the binary digits used to record the word BASE in BCD Solution: B = 110010 in BCD binary notation A = 110001 in BCD binary notation S = 010010 in BCD binary notation E = 110101 in BCD binary notation So the binary digits 110010 110001 010010 110101 B A S E will record the word BASE in BCD BCD Coding Scheme (Example 1)
  • 23. Example Using octal notation, show BCD coding for the word DIGIT Solution: D = 64 in BCD octal notation I = 71 in BCD octal notation G = 67 in BCD octal notation I = 71 in BCD octal notation T = 23 in BCD octal notation Hence, BCD coding for the word DIGIT in octal notation will be 64 71 67 71 23 D I G I T BCD Coding Scheme (Example 2)
  • 24. ? EBCDIC stands for Extended Binary Coded Decimal Interchange Code ? It uses 8 bits to represent a symbol ? It can represent 256 (28) different characters EBCDIC
  • 25. Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Standard Code for? ASCII stands for American Information Interchange. and can and can ? ASCII is of two types C ASCII-7 and ASCII-8 ? ASCII-7 uses 7 bits to represent a symbol represent 128 (27) different characters ? ASCII-8 uses 8 bits to represent a symbol represent 256 (28) different characters ? First 128 characters in ASCII-7 and ASCII-8 are same ASCII
  • 26. Character ASCII-7 / ASCII-8 Hexadecimal EquivalentZone Digit 0 0011 0000 30 1 0011 0001 31 2 0011 0010 32 3 0011 0011 33 4 0011 0100 34 5 0011 0101 35 6 0011 0110 36 7 0011 0111 37 8 0011 1000 38 9 0011 1001 39 Coding of Numeric and Alphabetic Characters in ASCII
  • 27. Character ASCII-7 / ASCII-8 Hexadecimal EquivalentZone Digit A 0100 0001 41 B 0100 0010 42 C 0100 0011 43 D 0100 0100 44 E 0100 0101 45 F 0100 0110 46 G 0100 0111 47 H 0100 1000 48 I 0100 1001 49 J 0100 1010 4A K 0100 1011 4B L 0100 1100 4C M 0100 1101 4D Coding of Numeric and Alphabetic Characters in ASCII
  • 28. Character ASCII-7 / ASCII-8 Hexadecimal EquivalentZone Digit N 0100 1110 4E O 0100 1111 4F P 0101 0000 50 Q 0101 0001 51 R 0101 0010 52 S 0101 0011 53 T 0101 0100 54 U 0101 0101 55 V 0101 0110 56 W 0101 0111 57 X 0101 1000 58 Y 0101 1001 59 Z 0101 1010 5A Coding of Numeric and Alphabetic Characters in ASCII
  • 29. Example How many bytes are requiredWrite binary coding for the word BOY in ASCII-7. for this representation? Solution: B = 1000010 in ASCII-7 binary notation O = 1001111 in ASCII-7 binary notation Y = 1011001 in ASCII-7 binary notation Hence, binary coding for the word BOY in ASCII-7 will be 1000010 1001111 1011001 B O Y Since each character in ASCII-7 requires one byte for its representation and there are 3 characters in the word BOY, 3 bytes will be required for this representation ASCII-7 Coding Scheme
  • 30. Example How many bytes areWrite binary coding for the word SKY in ASCII-8. required for this representation? Solution: S = 01010011 in ASCII-8 binary notation K = 01001011 in ASCII-8 binary notation Y = 01011001 in ASCII-8 binary notation Hence, binary coding for the word SKY in ASCII-8 will be 01010011 01001011 01011001 S K Y Since each character in ASCII-8 requires one byte for its representation and there are 3 characters in the word SKY, 3 bytes will be required for this representation ASCII-8 Coding Scheme
  • 31. ? Why Unicode: ? No single encoding system supports all languages ? Different encoding systems conflict ? Unicode features: ? Provides a consistent way of encoding multilingual plain text ? Defines codes for characters used in all major languages of the world ? Defines codes for special characters or mathematical symbols ? With Unicode 65,000 (216) different characters can be represented. Unicode

Editor's Notes

  • #7: Reasons for using binary instead of decimal numbers
  • #9: A binary digital system