0% found this document useful (0 votes)
41 views4 pages

Number System

A number system is a method for representing numbers using specific symbols and rules, with common types including decimal, binary, octal, and hexadecimal. The document outlines conversions between these systems and provides examples for each type, as well as an ASCII table for characters 1-20. Understanding these concepts is crucial for computer logic and programming.

Uploaded by

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

Number System

A number system is a method for representing numbers using specific symbols and rules, with common types including decimal, binary, octal, and hexadecimal. The document outlines conversions between these systems and provides examples for each type, as well as an ASCII table for characters 1-20. Understanding these concepts is crucial for computer logic and programming.

Uploaded by

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

Short Note: Number System

A Number System is a way to represent numbers using specific symbols and rules. In
computing, different number systems are used to store and process data.

Types of Number Systems:

1. Decimal (Base-10) – Uses digits 0 to 9.

o Example: 2510,1001025_{10}, 100_{10}

2. Binary (Base-2) – Uses only 0 and 1, used by computers.

o Example: 10102=10101010_2 = 10_{10}

3. Octal (Base-8) – Uses digits 0 to 7.

o Example: 128=101012_8 = 10_{10}

4. Hexadecimal (Base-16) – Uses digits 0-9 and A-F (A=10, B=11, etc.).

o Example: 1A16=26101A_{16} = 26_{10}

Conversions Between Number Systems

1. Decimal to Binary Conversion (Example: 13₁₀ to Binary)

Divide by 2 and record remainders:

1. 13 ÷ 2 = 6 remainder 1

2. 6 ÷ 2 = 3 remainder 0

3. 3 ÷ 2 = 1 remainder 1

4. 1 ÷ 2 = 0 remainder 1

Binary Equivalent: 1101₂

2. Binary to Decimal Conversion (Example: 1011₂ to Decimal)

(1×23)+(0×22)+(1×21)+(1×20)(1 \times 2^3) + (0 \times 2^2) + (1 \times 2^1) + (1 \times 2^0)


=(8)+(0)+(2)+(1)=1110= (8) + (0) + (2) + (1) = 11_{10}
3. Octal to Binary Conversion (Example: 47₈ to Binary)

Convert each digit into its 3-bit binary equivalent:

48=1002,78=11124_8 = 100_2, \quad 7_8 = 111_2

Binary Equivalent: 100111₂

4. Hexadecimal to Binary Conversion (Example: 2F₁₆ to Binary)

Convert each digit into its 4-bit binary equivalent:

216=00102,F16=111122_{16} = 0010_2, \quad F_{16} = 1111_2

Binary Equivalent: 00101111₂

5. Octal to Decimal Conversion (Example: 52₈ to Decimal)

(5×81)+(2×80)(5 \times 8^1) + (2 \times 8^0) =(5×8)+(2×1)=40+2=4210= (5 \times 8) + (2


\times 1) = 40 + 2 = 42_{10}

6. Decimal to Octal Conversion (Example: 83₁₀ to Octal)

Divide by 8 and record remainders:

1. 83 ÷ 8 = 10 remainder 3

2. 10 ÷ 8 = 1 remainder 2

3. 1 ÷ 8 = 0 remainder 1

Octal Equivalent: 123₈

7. Binary to Octal Conversion (Example: 101101₂ to Octal)

Group binary digits into 3-bit groups from right:

101 101101 \ 101

Convert each group to octal:

1012=58,1012=58101_2 = 5_8, \quad 101_2 = 5_8


Octal Equivalent: 55₈

8. Binary to Hexadecimal Conversion (Example: 11011110₂ to Hexadecimal)

Group binary digits into 4-bit groups from right:

1101 11101101 \ 1110

Convert each group to hexadecimal:

11012=D16,11102=E161101_2 = D_{16}, \quad 1110_2 = E_{16}

Hexadecimal Equivalent: DE₁₆

ASCII Table (Characters 1-20)

Decimal Binary Hexadecimal Character Description

1 00000001 01 SOH Start of Heading

2 00000010 02 STX Start of Text

3 00000011 03 ETX End of Text

4 00000100 04 EOT End of Transmission

5 00000101 05 ENQ Enquiry

6 00000110 06 ACK Acknowledge

7 00000111 07 BEL Bell (Alert)

8 00001000 08 BS Backspace

9 00001001 09 TAB Horizontal Tab

10 00001010 0A LF Line Feed (New Line)

11 00001011 0B VT Vertical Tab

12 00001100 0C FF Form Feed

13 00001101 0D CR Carriage Return


Decimal Binary Hexadecimal Character Description

14 00001110 0E SO Shift Out

15 00001111 0F SI Shift In

16 00010000 10 DLE Data Link Escape

17 00010001 11 DC1 Device Control 1

18 00010010 12 DC2 Device Control 2

19 00010011 13 DC3 Device Control 3

20 00010100 14 DC4 Device Control 4

Summary Table

Conversion Example Result

Decimal → Binary 13₁₀ 1101₂

Binary → Decimal 1011₂ 11₁₀

Octal → Binary 47₈ 100111₂

Hexadecimal → Binary 2F₁₆ 00101111₂

Understanding number systems and ASCII codes is essential for learning computer logic
and programming!

You might also like