Docsity

Analog and Digital C - Number Systems 2, Study notes of Digital & Analog Electronics

Partial preview of the text

Download Analog and Digital C - Number Systems 2 and more Study notes Digital & Analog Electronics in PDF only on Docsity!

Number Systems

and Binary Arithmetic

Introduction to Numbering

Systems

We are all familiar with the decimal

number system (Base 10). Some other

number systems that we will work with

are:

  • BinaryBase 2
  • OctalBase 8
  • HexadecimalBase 16

Significant Digits

Binary: 11101101

Most significant digit Least significant digit

Hexadecimal: 1D63A7A

Most significant digit Least significant digit

Binary Number System

Also called the “Base 2 system”

The binary number system is used to

model the series of electrical signals

computers use to represent information

0 represents the no voltage or an off

state

1 represents the presence of voltage or an

on state

Binary Addition

4 Possible Binary Addition Combinations:

Carry Sum

Note that leading

zeroes are

frequently

dropped.

Decimal to Binary

Conversion

The easiest way to convert a decimal

number to its binary equivalent is to use

the Division Algorithm

This method repeatedly divides a decimal

number by 2 and records the quotient and

remainder

  • The remainder digits (a sequence of zeros

and ones) form the binary equivalent in

least significant to most significant digit

sequence

Binary to Decimal

Conversion

  • The easiest method for converting a

binary number to its decimal

equivalent is to use the

Multiplication Algorithm

  • Multiply the binary digits by increasing

powers of two, starting from the right

  • Then, to find the decimal number

equivalent, sum those products

Multiplication Algorithm

Convert (10101101)

2

to its decimal equivalent :

Binary 1 0 1 0 1 1 0 1

Positional Values

x

x

x x x x

x x

2

0

2

1

2

2

2

3

2

4

2

5

2

6

2

7

128 + 32 + 8 + 4 + 1

Products

173

10

Decimal to Octal Conversion

Convert 427

10

to its octal equivalent:

427 / 8 = 53 R3 Divide by 8; R is LSD

53 / 8 = 6 R5 Divide Q by 8; R is next digit

6 / 8 = 0 R6 Repeat until Q = 0

653

8

Octal to Decimal Conversion

Convert 653

8

to its decimal equivalent:

x x

x

2

1

0

10

Positional Values

Products

Octal Digits

Hexadecimal Number

System

Base 16 system

Uses digits 0-9 &

letters A,B,C,D,E,F

Groups of four bits

represent each

base 16 digit

Decimal to Hexadecimal

Conversion

Convert 830

10

to its hexadecimal equivalent:

830 / 16 = 51 R
51 / 16 = 3 R
3 / 16 = 0 R

33E

16

= E in Hex

Binary to Hexadecimal

Conversion

The easiest method for converting binary

to hexadecimal is to use a substitution

code

Each hex number converts to 4 binary

digits

Substitution Code

Convert 010101101010111001101010

2

to

hex using the 4-bit substitution code :

5 6 A E 6
A

56AE6A

16