0% found this document useful (0 votes)
29 views9 pages

Practicum Presentation

practicum

Uploaded by

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

Practicum Presentation

practicum

Uploaded by

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

Data Representation and Coding

A digital computer works with binary number system. The binary


number system has only two digits 0 and 1. Inside the computer,
binary number is represented by an electrical pulse. 1 means a
pulse of electricity and 0 means no pulse. Data is divided into
three types—alphabetic data, numeric data and alphanumeric
data. Alphabetic data is used to represent the alphabets. It
consists of capital letters A –Z, small letters a–z and blank space
etc. Alphabetic data is also called non-numeric data. Numeric
data consists of ten digit 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, two signs + and
– and decimal point. Alphanumeric data is used to represent
alphabetic data, numeric data, special characters and symbols.
One digit in binary number system is called a bit and combination
of eight bits is called a byte. A byte is the basic unit that is used to
represent the alphabetic, numeric and alphanumeric data. All the
data that is entered into a computer is first converted into the
binary form and after processing, it is again converted to human
readable for.
Number Systems
There are different types of number systems that are used to
represent data. You are already familiar with the decimal number
system. The other useful number systems are binary, octal and
hexadecimal. You may regard each digit as a box that can hold a
number. Let us discuss the various number systems:
Binary Number System
In the binary number system, there can only be two choices for
representing data—either a "0" or a "1". The base or radix of the
binary number system is
Octal Number System
In the octal number system, there can be eight possibilities: " 0" , "
1" , " 2" , " 3" , " 4 " , " 5" , " 6" , " 7" . The base or radix of the octal
number system is 8.
3. Hexadecimal Number System
In the hexadecimal number system, we have 16 symbols: " 0" , "
1" , " 2" , " 3" , " 4 " , " 5" , " 6" , " 7" , " 8" , " 9" , " A " , " B " , " C" ,
" D" , " E" , and " F" . The base or radix of the hexadecimal
number system is 1
Conversion of Numbers from One Number
System to the Other
We can convert a number in one system to the other system by
following rules specified by the number systems. Following
conversions are generally performed in calculations.
Decimal to Binary Conversion
To convert a decimal number to its equivalent binary number,
follow these steps:
1. Divide the number by 2 and store the remainder.
2. Divide the quotient by 2 and store the remainder.
3. Repeat these steps until quotient becomes 0.
4. Write the remainders from bottom to top order.
This arrangement of remainder digits will be the binary equivalent
of the number. Let us describe this conversion process with
decimal number 2
Let us convert the given decimal number 294 into a binary
number.
Divide by 2 Result Remainder Binary Value
294 ÷ 2 147 0 0 (LSB)

147 ÷ 2 73 1 1

73 ÷ 2 36 1 1

36 ÷ 2 18 0 0

18 ÷ 2 9 0 0

9÷2 4 1 1

4÷2 2 0 0

2÷2 1 0 0

1÷2 0 1 1 (MSB)

Therefore, the binary equivalent for the given decimal number


294 is 100100110
10 2

294 =100100110
10 2

Converting Decimal to Hexadecimal

To convert a decimal number to its equivalent hexadecimal number, follow


these steps:

1. Divide the number by 16 and store the remainder.

2. Divide the quotient by 16 and store the remainder.

3. Repeat these steps until quotient becomes 0.

4. Write the remainders from bottom to top order.


The steps are same as in decimal to binary conversion with only one
difference that the number is divided by 16 because, 16 is the base in
hexadecimal number system.

Problem: Convert 1228 into hexadecimal.


10
Solution:
Divide by 16 Quotient Remainder Hex Value

1228 ÷ 16 76 12 C

76 ÷ 16 4 12 C

4 ÷ 16 0 4 4

Therefore, 1228 = 4CC


10 16

Converting Decimal to Octal

To convert a decimal number to its equivalent octal number, follow these


steps:

1. Divide the number by 8 and store the remainder.

2. Divide the quotient by 8 and store the remainder.

3. Repeat these steps until quotient becomes 0.

4. Write the remainders from bottom to top order.

The steps are same as in decimal to binary conversion with only one
difference that the number is divided by 8 because, 8 is the base in octal
number system.

Example 1: Convert (127) to Octal.


10

Solution: Divide 127 by 8


127 ÷ 8= 15(Quotient) and (7) Remainder
Divide 15 by 8 again.
15 ÷ 8 = 1(Quotient) and (7) Remainder
Divide 1 by 8, we get;
1 ÷ 8 = 0(Quotient) and (1) Remainder
Since the quotient is zero now, no more division can be done. So
by taking the remainders in reverse order, we get the equivalent
octal number.
Hence, (127) = (177)
10 8

Computer Coding System


We are already familiar about different types of number systems. The
computers convert the information, numeric or non-numeric, into binary
form. Therefore, one must know how the data/ information is stored in
computer memory. A computer handles non-numeric data in addition to
numerical data, that is, alphabets, punctuation marks and other special
characters. Some predefined codes are used to represent the numeric and
nonnumeric characters. These codes are known as alpha numeric codes.
Any data or information is represented internally using the bits 0 and 1. A
computer system’s data/ information storage capacity is represented by
bytes, kilobytes, megabytes, gigabytes and terabytes.
1 Byte = 8 bits
1 Kilobyte (K B) = 210 bytes = 1024 bytes 1 M egabyte (M B ) =
1024 K B = 21 0 × 21 0 bytes = 22 0 bytes 1 Gigabyte (GB ) =
1024 M B = 21 0 × 22 0 bytes = 23 0 bytes 1 Terabyte (TB ) =
1024 GB = 21 0 × 23 0 bytes = 24 0 bytes
Let us discuss some useful codes for data representation:
BCD (Binary Coded Decimal)
Binary Coded Decimal (B CD) code is one of the early computer
codes. The idea of this coding scheme is to convert each digit of a
decimal number into its binary equivalent instead of converting
the entire decimal value into a binary number. This makes the
conversion process easier. Table 1.5 shows B CD equivalent of
each decimal digit. Since 8 and 9 require 4 bits, all decimal digits
are represented in B CD by 4 bits.
Truth Table for Binary Coded Decimal

DECIMAL NUMBER BCD

0 0000

1 0001

2 0010

3 0011

4 0100

5 0101

6 0110

7 0111

8 1000

9 1001

In the BCD numbering system, the given decimal number is segregated


into chunks of four bits for each decimal digit within the number. Each
decimal digit is converted into its direct binary form (usually represented in
4-bits).
For example:

1. Convert (123)10 in BCD


From the truth table above,
1 -> 0001
2 -> 0010
3 -> 0011
thus, BCD becomes -> 0001 0010 0011
ASCII
What is ASCII – A Complete Guide to Generating
ASCII Code
The American Standard Code for Information Interchange, or ASCII, is a
character encoding standard that has been a foundational element in computing
for decades. It plays a crucial role in representing text and control characters in
digital form.
SCII Encoding Standards
ASCII Character Set
The ASCII character set includes standard characters such as letters,
numbers, punctuation, and control characters. Each character is assigned
a unique seven-bit binary code.
Decimal Character Description

0 NUL Null

1 SOH Start of Header

2 STX Start of Text

3 ETX End of Text

4 EOT End of Transmit

5 ENQ Enquiry

6 ACK Acknowledge

7 BEL Bell
Decimal Character Description

8 BS Backspace

9 HT Horizontal Tab

10 LF Line Feed

11 VT Vertical Tab

12 FF Form Feed

Carriage
CR
13 Return

14 SO Shift Out

15 SI Shift In

… … …

32 (space) Space

Exclamation
!
33 Mark

34 “ Quotation Mark
Decimal Character Description

… … …

65 A Uppercase A

66 B Uppercase B

… … …

97 a Lowercase a

98 b Lowercase b

… … …

127 DEL Delete

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy