knowt logo

Numbering System

LESSON 4: NUMBER SYSTEMS

Base-N Number System

  • N Digits: 1, 2, 3, 4, ..., N-1

  • Example: 1045N

    • d₀: least significant digit (LSD)

    • dₙ₋₁: most significant digit (MSD)

Decimal Number System

  • Base 10: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

  • Example: 104510

    • d₀: least significant digit (LSD)

    • dₙ₋₁: most significant digit (MSD)

Binary Number System

  • Base 2: 0, 1

  • Example: 10101102

  • Bits:

    • b₀: least significant digit (LSD)

    • bₙ₋₁: most significant digit (MSD)

  • Data Sizes:

    • Nybble = 4 bits

    • Byte = 8 bits

    • Short word = 2 bytes = 16 bits

    • Double word = 4 bytes = 32 bits

    • Long word = 8 bytes = 64 bits

  • Units:

    • 1K (kilo or “kibi”) = 1,024

    • 1M (mega or “mebi”) = (1K)² = 1,048,576

    • 1G (giga or “gibi”) = (1K) (1M) = 1,073,741,824

Hexadecimal Number System

  • Base 16: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

  • Example: EF5616

Binary Representation of Hexadecimal Digits

Hex

Bin

0

0000

1

0001

2

0010

3

0011

4

0100

5

0101

6

0110

7

0111

8

1000

9

1001

A

1010

B

1011

C

1100

D

1101

E

1110

F

1111

Binary Addition

Single Bit

  • 0 + 0 = 0

  • 0 + 1 = 1

  • 1 + 0 = 1

  • 1 + 1 = 10

4-bit Addition

  • 4 + 4 = 8

  • 4 + 8 = C

  • 8 + 7 = F

  • F + E = 1D “carry”

Number Conversions

Decimal (Base 10)

Binary (Base 2)

Hexadecimal (Base 16)

0

0

0

1

1

1

2

10

2

3

11

3

4

100

4

5

101

5

6

110

6

7

111

7

8

1000

8

9

1001

9

10

1010

A

11

1011

B

12

1100

C

13

1101

D

FJ

Numbering System

LESSON 4: NUMBER SYSTEMS

Base-N Number System

  • N Digits: 1, 2, 3, 4, ..., N-1

  • Example: 1045N

    • d₀: least significant digit (LSD)

    • dₙ₋₁: most significant digit (MSD)

Decimal Number System

  • Base 10: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

  • Example: 104510

    • d₀: least significant digit (LSD)

    • dₙ₋₁: most significant digit (MSD)

Binary Number System

  • Base 2: 0, 1

  • Example: 10101102

  • Bits:

    • b₀: least significant digit (LSD)

    • bₙ₋₁: most significant digit (MSD)

  • Data Sizes:

    • Nybble = 4 bits

    • Byte = 8 bits

    • Short word = 2 bytes = 16 bits

    • Double word = 4 bytes = 32 bits

    • Long word = 8 bytes = 64 bits

  • Units:

    • 1K (kilo or “kibi”) = 1,024

    • 1M (mega or “mebi”) = (1K)² = 1,048,576

    • 1G (giga or “gibi”) = (1K) (1M) = 1,073,741,824

Hexadecimal Number System

  • Base 16: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

  • Example: EF5616

Binary Representation of Hexadecimal Digits

Hex

Bin

0

0000

1

0001

2

0010

3

0011

4

0100

5

0101

6

0110

7

0111

8

1000

9

1001

A

1010

B

1011

C

1100

D

1101

E

1110

F

1111

Binary Addition

Single Bit

  • 0 + 0 = 0

  • 0 + 1 = 1

  • 1 + 0 = 1

  • 1 + 1 = 10

4-bit Addition

  • 4 + 4 = 8

  • 4 + 8 = C

  • 8 + 7 = F

  • F + E = 1D “carry”

Number Conversions

Decimal (Base 10)

Binary (Base 2)

Hexadecimal (Base 16)

0

0

0

1

1

1

2

10

2

3

11

3

4

100

4

5

101

5

6

110

6

7

111

7

8

1000

8

9

1001

9

10

1010

A

11

1011

B

12

1100

C

13

1101

D

robot