Number Systems

Chapter 2 · Tamil Nadu State Board

  • 15 min read
  • 5-question quiz

Every key point below shows the sentence from your textbook it comes from. Book back answers are solved and checked against the book; answers we could not prove are left out. How we check content

In short

This lesson explains how computers represent data using bits and how number systems use different bases. It teaches methods for converting between decimal, binary, octal and hexadecimal numbers, as well as representing signed numbers and performing binary arithmetic. It also describes how character encoding systems represent letters and symbols in memory. These ideas matter because computers store and process data in forms they can understand.

Written by AI from this lesson. How we check it

Key points

  • Computers handle data as binary digits, with each bit represented by 0 or 1.
    From your textbook
    “‘0’ and ‘1’ that the Computer can understand is called Machine language.”
  • A nibble contains four bits, while a byte contains eight bits.
    From your textbook
    “A nibble is a collection of 4 bits (Binary digits).”
  • A number system's base, or radix, tells how many digits it uses.
    From your textbook
    “Radix or base is the count of number of digits in each number system.”
  • Binary uses two digits, and each digit's place is weighted by a power of 2.
    From your textbook
    “The numbers in the binary system are represented to the base 2 and the positional multipliers are the powers of 2.”
  • For decimal-to-binary conversion by division, read the remainders from the last one back to the first.
    From your textbook
    “Write the final answer starting from final remainder value obtained to the first remainder value obtained.”
  • Binary digits can be grouped in threes for octal conversion and in fours for hexadecimal conversion.
    From your textbook
    “Group the given binary number into 3 bits from right to left.”
  • In signed magnitude, the leftmost bit indicates whether the binary number is positive or negative.
    From your textbook
    “If this bit is 0, it is a positive number and if it 1, it is a negative number.”
Test yourself: 5 questions

Formulas in this chapter

Data and how computers represent it

Data means raw facts about people, places, or objects. When data is processed, it gives information. Computers represent data using 0 and 1, which are called binary digits or bits.

Definition

Bit
A bit is one binary digit, either 0 or 1, and is the basic unit of data in a computer.

Units of computer data

  • A nibble is a collection of 4 bits.
  • A byte is a collection of 8 bits and is a basic unit for measuring computer memory.
  • Word length is the number of bits processed by a computer’s CPU.

Memory units

UnitSize
Kilo (K)2^10 = 1,024
Mega (M)2^20 = 1,048,576
Giga (G)2^30 = 1,073,741,824
Tera (T)2^40 = 1,099,511,627,776
Peta (P)2^50 = 1,125,899,906,842,624
Exa (E)2^60 = 1,152,921,504,606,846,976
Zetta (Z)2^70 = 1,180,591,620,717,411,303,424
Yotta (Y)2^80 = 1,208,925,819,614,629,174,706,173

In the decimal system, 1 Kilo represents 1000, or 103. In the binary system, 1 KiloByte represents 1024 bytes, or 210. ASCII is a commonly used coding scheme for representing characters. Its values from 0 to 127 represent specific characters.

Useful ASCII values and ranges

  • The ASCII value for a blank space is 32.
  • The ASCII value of numeric 0 is 48.
  • Lower case alphabet values range from 97 to 122.
  • Upper case alphabet values range from 65 to 90.

Remember: A computer handles data as 0s and 1s. A 64-bit computer can process 64-bit numbers in one operation, while a 32-bit computer breaks them into smaller pieces.

Number systems and their bases

Definition

Numbering system
A numbering system is a way of representing numbers, and its base or radix is the count of digits it uses.

Digits used in each number system

Number systemBase and digits
Decimal10: 0,1,2,3,4,5,6,7,8,9
Binary2: 0,1
Octal8: 0,1,2,3,4,5,6,7
Hexadecimal16: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

Decimal is the number system most commonly used in daily life. In a positional number system, a digit’s value depends on its position. Each position has a weight based on a power of the system’s base.

Remember: A number can use only the digits allowed by its base. For example, Binary uses only 0 and 1.

Decimal, Binary, Octal, and Hexadecimal numbers

Decimal uses ten digits, from 0 to 9. Binary uses 0 and 1, with positional weights that are powers of 2. The leftmost binary bit is the Most Significant Bit (MSB), and the rightmost is the Least Significant Bit (LSB).

Worked example

Convert (123)10 into its positional-value form.

Try it first, then show the solution
  1. Multiply each digit by 10 raised to the power for its position.
  2. 1x102 + 2x101 + 3x100 = 100 + 20 + 3

Answer: (123)10

Worked example

Find the decimal equivalent of (1101)2.

Try it first, then show the solution
  1. Use powers of 2 for the digit positions.
  2. 1 × 23 + 1 × 22 + 0 × 21 + 1 × 20
  3. 8 + 4 + 0 + 1

Answer: (13)10

Octal uses the digits 0 through 7. Each position has a weight that is a power of 8. Hexadecimal uses base 16 and is a compact way to represent a binary sequence.

Hexadecimal letters and their values

  • A represents 10.
  • B represents 11.
  • C represents 12.
  • D represents 13.
  • E represents 14.
  • F represents 15.

Worked example

Find the decimal equivalent of (547)8.

Try it first, then show the solution
  1. Use powers of 8 for the digit positions.
  2. 5×82 + 4×81 + 7×80
  3. 5×64 + 4×8 + 7×1 = 320 + 32 + 7

Answer: (359)10

Worked example

Find the decimal equivalent of (25)16.

Try it first, then show the solution
  1. Use powers of 16 for the digit positions.
  2. 2×161 + 5×160
  3. 32+5

Answer: (37)10

Octal and hexadecimal conversions

To convert an octal number to binary, replace each octal digit with its 3-digit binary equivalent. Keep the digits in the same order. For example, (6213)8 becomes (110010001011)2.

To convert a hexadecimal number to decimal, multiply each digit by its positional weight and add the results. The weights are powers of 16, counted from right to left. For hexadecimal digits A to F, use their decimal equivalents; here, F = 15.

Worked example

Convert (25F)16 to decimal.

Try it first, then show the solution
  1. Use the weights 256, 16 and 1 from left to right.
  2. Replace F with 15.
  3. Calculate 2 × 256 + 5 × 16 + 15 × 1 = 512 + 80 + 15.

Answer: (25F)16 = (607)10

To convert hexadecimal to binary, replace each hexadecimal digit with its 4-bit binary equivalent. For example, 8, B and C become 1000, 1011 and 1100. Therefore, (8BC)16 = (100010111100)2.

Remember: Use 3 binary bits for each octal digit and 4 binary bits for each hexadecimal digit.

Signed binary numbers and complements

Computers can represent positive numbers as unsigned numbers and positive or negative numbers as signed numbers. The leftmost bit is the Most Significant Bit (MSB), also called the sign bit. In signed magnitude, 0 means positive and 1 means negative; in an 8-bit number, 7 bits store the magnitude.

Ways to represent signed numbers

MethodHow it works
Signed MagnitudeThe leftmost bit gives the sign. The remaining bits give the magnitude.
1’s ComplementFor a negative number, write its binary form in 8 bits and invert every bit.
2’s ComplementInvert every bit, then add 1 to the Least Significant Bit (LSB).

Steps to find 1’s complement

  • Convert the decimal number to binary.
  • Make the binary number 8 bits by adding 0s at the left if needed.
  • Invert every bit: change 1 to 0 and 0 to 1.

Worked example

Find the 1’s complement of (–24)10.

Try it first, then show the solution
  1. Write 24 in 8-bit binary: 00011000.
  2. Invert every bit.

Answer: The 1’s complement is 11100111.

Worked example

Find the 2’s complement of (–24)10.

Try it first, then show the solution
  1. Write +24 in 8-bit binary: 00011000.
  2. Invert every bit to get 11100111.
  3. Add 1 to the LSB.

Answer: The 2’s complement is 11101000.

Binary addition and subtraction

Binary numbers can be added and subtracted. In addition, 1 + 1 gives a sum of 0 and a carry of 1. Add each carry to the next position.

Binary addition results

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 10: write 0 and carry 1.

Worked example

Add 10112 + 10012.

Try it first, then show the solution
  1. Add the bits from right to left.
  2. Use carries when a column adds to 2.

Answer: 10112 + 10012 = 101002

In binary subtraction, borrow from the next Most Significant Bit when subtracting 1 from 0. If that bit is 0, continue to a more significant bit that contains 1. Change that 1 to 0 and change the 0s passed along into 1s.

Character encoding in memory

Definition

Character set
A character set is the set of uppercase letters, lowercase letters, digits and special characters used in a computer.

Characters are represented by numbers in a computer. An encoding system gives characters a common way to be represented. Several encoding systems are used.

Character encoding systems

  • BCD – Binary Coded Decimal
  • EBCDIC – Extended Binary Coded Decimal Interchange Code
  • ASCII – American Standard Code for Information Interchange
  • Unicode
  • ISCII – Indian Standard Code for Information Interchange

Boolean Algebra and Binary Values

Boolean algebra helps describe how digital circuits connect inputs to outputs. It uses two values: 1 for True and 0 for False. A Boolean variable can store either value.

Definition

Logical statement
A sentence that can be decided to be True or False is a logical statement.

Definition

Truth table
A truth table lists the possible input values and the result for each combination.

Basic logical operators

  • AND is shown by a dot (.).
  • OR is shown by a plus sign (+).
  • NOT is shown by an overbar or a single apostrophe.

Remember: In Boolean algebra, 1 means True and 0 means False.

AND, OR and NOT Operations

How the basic operators work

OperatorWhen the output is 1
ANDOnly when all inputs are 1.
ORWhen at least one input is 1.
NOTWhen the input is 0; it reverses the input.
AND

Y = A . B

A and B are the inputs, and Y is the output.

OR

Y = A + B

A and B are the inputs, and Y is the output.

NOT

Y = A

A is the input, and Y is its opposite. The overbar represents NOT.

Two-input truth tables

  • AND: A B Y — 0 0 0; 0 1 0; 1 0 0; 1 1 1.
  • OR: A B Y — 0 0 0; 0 1 1; 1 0 1; 1 1 1.
  • NOT: A Y — 0 1; 1 0.

NAND, NOR and Combined Expressions

NAND combines NOT with AND, so it reverses the AND output. NOR combines NOT with OR, so it reverses the OR output. NAND and NOR are called Universal gates because the fundamental logic gates can be realized through them.

NAND

A NAND B = NOT (A AND B)

The output is the opposite of the AND result.

NOR

A NOR B = NOT (A OR B)

The output is the opposite of the OR result.

Two-input truth tables

  • NAND: A B Y — 0 0 1; 0 1 1; 1 0 1; 1 1 0.
  • NOR: A B Y — 0 0 1; 0 1 0; 1 0 0; 1 1 0.

Worked example

Consider D = A + ( B . C ). When is D equal to 1?

Try it first, then show the solution
  1. The expression uses OR between A and ( B . C ).
  2. D is 1 if A is 1, or if ( B . C ) is 1.

Answer: D is 1 when A is 1 or when ( B . C ) is 1.

Logic Gates

Definition

Logic gate
A logic gate is a basic electronic circuit that uses one or more signals to produce an output signal.

Fundamental and derived gates

GroupGates
Fundamental gatesAND, OR and NOT.
Derived gatesNAND, NOR, XOR and XNOR.

An AND gate gives 1 only when both inputs are 1. An OR gate gives 1 when one or both inputs are 1. A NOT gate has one input and gives its complement as the output.

AND gate

C = A . B or simply C = AB

A and B are the inputs, and C is the output.

OR gate

C = A + B

A and B are the inputs, and C is the output.

NOT gate

C = A

A is the input, and C is the complement of A. The overbar represents NOT.

Remember: For two inputs, the possible combinations are 00, 01, 10 and 11.

NOR Gate and Bubbled AND Gate

A NOR gate is an OR gate followed by an inverter. Its output is 1 only when both inputs are 0. For every other input pair, the output is 0.

NOR output

C = (A + B)

A and B are the inputs, + means OR, and the brackets mean the OR result is inverted to give output C.

NOR truth table

ABC
001
010
100
110

A bubbled AND gate has inverters on the inputs of an AND gate. Its output matches the NOR gate for every input pair, so these two circuits can be used in place of each other.

De Morgan's first theorem

(A + B) = A . B

The complement of A OR B equals the complement of A AND the complement of B.

Remember: NOR and bubbled AND have the same truth table. Remember De Morgan's first theorem: (A + B) = A . B.

NAND Gate and Bubbled OR Gate

A NAND gate is an AND gate followed by a NOT gate. Its output is 0 only when both inputs are 1. For every other input pair, the output is 1.

NAND output

C = (A . B)

A and B are the inputs, . means AND, and the brackets mean the AND result is inverted to give output C.

NAND truth table

ABC
001
011
101
110

A bubbled OR gate has bubbles on its input lines, which represent inversion. Its output matches the NAND gate for every input pair, so the circuits are interchangeable.

De Morgan's second theorem

(A . B) = A + B

The complement of A AND B equals the complement of A OR the complement of B.

Remember: NAND and bubbled OR have the same truth table. Remember De Morgan's second theorem: (A . B) = A + B.

XOR and XNOR Gates

Definition

XOR gate
An XOR gate gives output 1 when its two inputs are different, and output 0 when they are the same.
XOR output

C = A ⊕ B

A and B are the inputs, and ⊕ is the exclusive-OR operator; C is the output.

XOR truth table

ABC
000
011
101
110

Definition

XNOR gate
An XNOR gate is an XOR gate followed by an inverter; it gives output 1 when its inputs are the same and 0 when they are different.
XNOR output

C = A ⊙ B

A and B are the inputs, ⊙ is the XNOR operator, and C is the output.

XNOR truth table

ABC
001
010
100
111

The XNOR output is the NOT of the XOR output. In Boolean algebra, ⊙ or “included dot” stands for XNOR.

Remember: XOR gives 1 for different inputs. XNOR gives 1 for matching inputs.

Boolean Algebra Theorems and Logic Gates

Boolean algebra laws

  • Identity: A + 0 = A; A . 1 = A
  • Complement: A + A = 1; A . A = 0
  • Commutative: A + B = B + A; A . B = B . A
  • Associative: A + (B + C) = (A + B) + C; A . (B . C) = (A . B) . C
  • Distributive: A . (B + C) = A . B + A . C; A + (B . C) = (A + B) . (A + C)
  • Null Element: A + 1 = 1; A . 0 = 0
  • Involution: (A) = A
  • Idempotence: A + A = A; A . A = A
  • Absorption: A + (A . B) = A; A . (A + B) = A
  • 3rd Distributive: A + A . B = A + B

Logic gates can be combined to perform complex operations. There is a practical limit to how many gates can fit in a given physical space. Arrays of logic gates are found in digital integrated circuits.

Logic gates shown in the chapter

  • AND
  • OR
  • NOT
  • NAND
  • NOR
  • XOR
  • XNOR

Questions students ask

Short, direct answers to what students search for in this chapter.

What is the difference between a bit, nibble, and byte?

A bit is one binary digit, either 0 or 1. A nibble is a collection of 4 bits. A byte is a collection of 8 bits and is used as a basic unit for measuring computer memory.

What is the base of the binary number system?

The binary number system has base 2 and uses only the digits 0 and 1. Its positional weights are powers of 2. The leftmost bit is the Most Significant Bit (MSB), and the rightmost bit is the Least Significant Bit (LSB).

How do you convert an octal number to decimal?

Multiply each octal digit by a power of 8 according to its position, then add the results. For example, (547)8 = 5×82 + 4×81 + 7×80 = 320 + 32 + 7 = (359)10.

What do the letters A to F mean in hexadecimal?

Hexadecimal uses base 16. Its first ten symbols are 0 to 9, and the remaining symbols are A to F. A represents 10, B is 11, C is 12, D is 13, E is 14, and F is 15.

What is the ASCII value for a blank space?

The ASCII value for a blank space is 32. ASCII is a commonly used coding scheme that uses binary values between 0 and 127 to represent specific characters.

How do you convert a decimal number to binary using repeated division?

Divide the decimal number repeatedly by 2 and record each remainder. Continue until the quotient becomes 0 or 1. Write the final quotient and remainders in reverse order, starting with the final remainder, to form the binary number.

Show 21 more questions

How do you convert a decimal fraction to binary?

Multiply the fraction by 2 and record the integer part of the product. Use the remaining fractional part for the next multiplication. Continue until the fraction repeats or becomes 0, then read the recorded integer parts from first to last.

How do you convert binary to octal?

Starting from the right, divide the binary digits into groups of 3. Add 0s to the left if the first group has fewer than 3 digits. Convert each group to its octal digit and read the digits from left to right.

How do you convert binary to hexadecimal?

Starting from the right, group the binary digits in sets of 4. Add 0s to the left if the first group has fewer than 4 digits. Convert each group into its hexadecimal digit and read the results from left to right.

How do you convert an octal number to binary?

Replace each octal digit with its 3-digit binary equivalent, keeping the digits in the same order. For example, the digits 6, 2, 1 and 3 become 110, 010, 001 and 011. So (6213)8 = (110010001011)2.

How do you convert hexadecimal to binary?

Replace each hexadecimal digit with its 4-bit binary equivalent and join the groups in order. For example, 8 becomes 1000, B becomes 1011 and C becomes 1100. Therefore, (8BC)16 = (100010111100)2.

What is the difference between 1’s complement and 2’s complement?

For 1’s complement, write the number in 8-bit binary and invert every bit. For 2’s complement, invert every bit and then add 1 to the Least Significant Bit. For –24, these forms are 11100111 and 11101000, respectively.

How do you add binary numbers?

Add the bits from right to left. The basic results are 0 + 0 = 0, 0 + 1 = 1 and 1 + 0 = 1. For 1 + 1, write 0 and carry 1 to the next position.

What are character encoding systems?

Character encoding systems represent characters as numbers so a computer can handle them. The systems listed are BCD, EBCDIC, ASCII, Unicode and ISCII. A character set includes uppercase and lowercase letters, digits and special characters.

What is ASCII and how many characters can it handle?

ASCII means American Standard Code for Information Interchange. It is a popular encoding system used by most computers and handles English characters. The 7 bit form can represent 128 characters, while ASCII-8 uses 8 bits and can represent 256 characters.

What is the ASCII code for uppercase A?

The uppercase letter A has the decimal ASCII value 65. Its 7 bit binary representation is 1000001. In ASCII-8, its binary representation is 01000001.

What is ISCII used for?

ISCII is an 8-bit coding system for handling characters in Indian local languages. It can represent 256 characters. It was formulated by the department of Electronics in India in the year 1986- 88, recognized by Bureau of Indian Standards (BIS), and is now integrated with Unicode.

Why was Unicode generated?

ASCII could not represent languages such as Tamil, Malayalam, Kannada and Telugu. Unicode was generated to handle universal languages. It is a 16 bit code that can represent 65536 characters, and its scheme is denoted by hexadecimal numbers.

How many characters can EBCDIC handle?

EBCDIC is an 8 bit coding system formulated by International Business Machine (IBM). It can handle 256 characters. Input code in ASCII can be converted to EBCDIC and vice versa.

What is Boolean algebra?

Boolean algebra is a mathematical system used to describe the relationship between inputs and outputs in digital circuits. It uses the values 1 and 0, where 1 means True and 0 means False.

What is the difference between AND and OR?

AND gives an output of 1 only when all its inputs are 1. OR gives an output of 1 when at least one input is 1. With two inputs, both operators give 0 when both inputs are 0.

What does a NOT gate do?

A NOT gate has one input and reverses its value. If the input is 0, the output is 1. If the input is 1, the output is 0. The output is the complement of the input.

Why are NAND and NOR called Universal gates?

NAND and NOR are called Universal gates because the fundamental logic gates can be realized through them. NAND reverses the output of AND, while NOR reverses the output of OR.

What is the output of a NOR gate?

A NOR gate gives output 1 only when both inputs are 0. If either input or both inputs are 1, the output is 0. Its output expression is C = (A + B), where the OR result is inverted.

What is the difference between XOR and XNOR gates?

An XOR gate gives output 1 when its inputs are different and 0 when they are the same. An XNOR gate gives output 1 when its inputs are the same and 0 when they are different. XNOR is an XOR gate followed by an inverter.

What is De Morgan's first theorem?

De Morgan's first theorem is (A + B) = A . B. It says that the complement of A OR B equals the complement of A AND the complement of B. A NOR gate and a bubbled AND gate produce the same outputs.

What is De Morgan's second theorem?

De Morgan's second theorem is (A . B) = A + B. It says that the complement of A AND B equals the complement of A OR the complement of B. A NAND gate and a bubbled OR gate produce the same outputs.

Book back answers

12 textbook exercises, solved and checked against the book. Questions we could not prove are left out.

SECTION – A Choose the correct answer

  1. Which refers to the number of bits processed by a computer’s CPU?

    • A) Byte
    • B) Nibble
    • C) Word length
    • D) Bit
    Try it, then show the answer

    C) Word length

    Word length refers to how many bits the CPU processes.

    From the book: “Word length refers to the number of bits processed by a Computer’s CPU.”

  2. How many bytes does 1 KiloByte contain?

    • A) 1000
    • B) 8
    • C) 4
    • D) 1024
    Try it, then show the answer

    D) 1024

    In the binary system, one KiloByte represents 1024 bytes.

    From the book: “In binary system, 1 KiloByte represents 1024 bytes”

  3. Expansion for ASCII

    • A) American School Code for Information Interchange
    • B) American Standard Code for Information Interchange
    • C) All Standard Code for Information Interchange
    • D) American Society Code for Information Interchange
    Try it, then show the answer

    B) American Standard Code for Information Interchange

    ASCII is expanded as American Standard Code for Information Interchange.

    From the book: “The most commonly used coding scheme is the American Standard Code for Information Interchange (ASCII).”

  4. 2^50 is referred as

    • A) Kilo
    • B) Tera
    • C) Peta
    • D) Zetta
    Try it, then show the answer

    C) Peta

    The memory-size table identifies Peta with 2^50.

    From the book: “Peta P 2^50 = 1,125,899,906,842,624”

All 12 book back answers →

Practice

Question 1 of 5Score 0

What does a byte contain?

Exam questions

Practice questions with model answers. These are not from an official paper.

What is a radix? Give one example. (2 marks)2 marks

Radix or base is the count of digits in a number system. For example, binary has base 2 and uses 0 and 1.

Explain how to convert a decimal number to binary using repeated division. (2 marks)2 marks

Repeatedly divide the decimal number by 2 and record each remainder. Continue until the quotient is 0 or 1, then write the answer from the final remainder back to the first remainder.

How is a binary number converted to octal? (2 marks)2 marks

Group its bits into sets of three, starting from the right. Add leading zeros if needed, then convert each group to its octal digit.

Describe how signed magnitude represents positive and negative numbers. (2 marks)2 marks

The leftmost bit is the sign bit. A 0 represents a positive number and a 1 represents a negative number; the remaining bits store the magnitude.

Watch out

  • Do not confuse the base of a number system with its largest digit: octal has base 8 but its digits go only from 0 to 7.
  • When using repeated division to convert an integer to another base, write the remainders in reverse order.

Still stuck on this lesson?

Get an AI answer grounded in your actual textbook — with the exact page reference.

Ask AI about this topic →