0% found this document useful (0 votes)
7 views

1.3

Binary representation is crucial in computing for its simplicity, efficiency, and universal compatibility with digital circuits. It uses a base-2 system to represent data, where each bit is either 0 or 1, allowing for the representation of numbers, characters, and other data types. Various encoding schemes like ASCII and UTF-8 facilitate the conversion of characters into binary for storage and processing.

Uploaded by

subbulakshmi
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)
7 views

1.3

Binary representation is crucial in computing for its simplicity, efficiency, and universal compatibility with digital circuits. It uses a base-2 system to represent data, where each bit is either 0 or 1, allowing for the representation of numbers, characters, and other data types. Various encoding schemes like ASCII and UTF-8 facilitate the conversion of characters into binary for storage and processing.

Uploaded by

subbulakshmi
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/ 5

3.

BINARY CODES
3.1 THE NEED FOR BINARY REPRESENTATION

Binary representation is essential in computing due to its simplicity and compatibility with digital
electronic circuits. Here's why:

1. Simplicity of Implementation:

∙ On/Off States: Binary only uses two states: "0" and "1," which can be easily represented by the
presence or absence of an electrical signal.
∙ Transistor Logic: Transistors, the fundamental building blocks of digital circuits, are naturally
suited for binary operations. They can be used to perform logical operations like AND, OR, and
NOT.

2. Efficiency and Speed:

∙ Fast Processing: Binary operations are relatively simple and can be performed very quickly by
computers.
∙ Compact Storage: Binary data can be stored efficiently in a compact format, using a minimal
number of bits.

3. Standardization and Compatibility:

∙ Universal Language: Binary is a universal language understood by all computers, regardless of


their hardware or software.
∙ Data Exchange: Binary representation is essential for the exchange of data between different
devices and systems.

4. Mathematical Foundations:
∙ Boolean Algebra: Binary operations are based on Boolean algebra, a mathematical system that
provides the foundation for digital logic.

3.2 BINARY REPRESENTATION OF NUMBERS

Binary representation is the way data is stored and processed in computers. It uses a base-2 system,
meaning there are only two possible values: 0 and 1. These values are often represented by the
presence or absence of an electrical signal.

How data is represented ?

∙ Bits: Each individual 0 or 1 is called a bit.


∙ Bytes: Groups of eight bits are combined to form a byte. Bytes are the fundamental unit of data
storage in computers.
∙ Characters: Bytes can be used to represent characters, numbers, symbols, and other types of data.
For example, the letter "A" might be represented by the binary sequence 01000001. ∙ Numbers:
Numbers can be represented in binary using different systems, such as: o Unsigned integers:
Represent positive numbers only.
o Signed integers: Can represent both positive and negative numbers using techniques like two's
complement.
o Floating-point numbers: Represent real numbers with decimal points.

Examples of Binary Representation

∙ The number 10 in binary: 1010


∙ The letter "A" in ASCII: 01000001

Why Binary?

∙ Simplicity: Computers are built using electronic circuits that are naturally suited for binary
operations.
∙ Efficiency: Binary operations can be performed very quickly by computers.
∙ Standardization: Binary is a universal language understood by all computers, regardless of their
hardware or software.

Binary Representation of Numbers

Binary representation is a system of representing numbers using only two digits: 0 and 1. This system
is used in computers because they are built on electronic circuits that can only handle "on" (1) or "off"
(0) states.

Unsigned Integers

∙ Positive Numbers: Only represent positive numbers.

∙ Place Values: Each position in a binary number represents a power of 2. For example, the rightmost
position represents 2^0 (1), the next position represents 2^1 (2), and so on.
∙ Conversion: To convert a decimal number to binary, repeatedly divide the decimal number by 2
and keep the remainders. The remainders, read from bottom to top, form the binary representation.

Example: Convert 13 to binary:

∙ 13 / 2 = 6 remainder 1
∙ 6 / 2 = 3 remainder 0
∙ 3 / 2 = 1 remainder 1
∙ 1 / 2 = 0 remainder 1

Binary representation: 1101

Signed Integers

∙ Positive and Negative Numbers: Can represent both positive and negative numbers. ∙ Two's
Complement: A common method for representing signed integers is two's complement. To find the
two's complement of a number, invert all the bits and add 1.
∙ Conversion: To convert a negative decimal number to binary, first convert its absolute value to
binary and then find its two's complement.

Example: Convert -5 to binary:

1. Convert 5 to binary: 0101


2. Invert all bits: 1010
3. Add 1: 1011

Binary representation: 1011

Floating-Point Numbers

∙ Real Numbers: Represent real numbers with decimal points.


∙ IEEE 754: The most common standard for representing floating-point numbers is IEEE 754. It uses
a fixed number of bits to represent the sign, exponent, and mantissa of a number.

3.3 BINARY REPRESENTATION OF CHARACTERS

Characters are represented in computers using a specific encoding scheme that assigns a unique
numerical value to each character. This numerical value is then converted to binary for storage and
processing.

Common Encoding Schemes

∙ ASCII (American Standard Code for Information Interchange): One of the oldest and most
widely used character encoding standards. It uses 7 bits to represent 128 characters, including letters,
numbers, punctuation marks, and control characters.

10

∙ UTF-8: A variable-length encoding scheme that can represent characters from almost all languages
in the world. It is compatible with ASCII and can use 1, 2, 3, or 4 bytes to represent a character. ∙
UTF-16: Another variable-length encoding scheme that can represent characters from almost all
languages. It uses 2 or 4 bytes to represent a character.

How Characters Are Represented

1. Character Lookup: The character to be represented is looked up in the encoding scheme's table.
2. Numerical Value: The corresponding numerical value is found for the character. 3. Binary
Conversion: The numerical value is converted to binary.

Example:

∙ The letter "A" has an ASCII value of 65.


∙ 65 in binary is 01000001.

Therefore, the binary representation of the letter "A" in ASCII is 01000001.

n computing, characters are represented by binary codes in a system called ASCII (American Standard
Code for Information Interchange) or Unicode, depending on the encoding scheme used. Each
character is assigned a unique numerical code, which is then represented in binary form.

Here are a few examples:

∙ Character 'A'
o ASCII code: 65
o Binary representation: 01000001
∙ Character 'a'
o ASCII code: 97
o Binary representation: 01100001
∙ Character '0'
o ASCII code: 48
o Binary representation: 00110000
∙ Character ' ' (space)
o ASCII code: 32
o Binary representation: 00100000

These binary representations are typically 8 bits long (one byte), but in Unicode, especially with UTF-8
encoding, characters might use more than one byte depending on the character's code point.

11

Discussion Questions
1. How did the invention of Morse code influence global communication, and
what are some of its modern-day applications or equivalents?"

2. How has Braille code transformed accessibility for individuals with visual
impairments, and what challenges and innovations exist today in expanding
its use in a digital world?"

3. In what ways does the binary system differ from other number systems like
decimal or hexadecimal, and why is binary particularly well-suited for
representing data in computers?"
12

You might also like