#### Number system

Base 2: Binary numbering system

1)Only have 2 values

2)Work on binary logic(0,1)

Base 8:Octal numbering system

1)Ranges from 0-7 total 8

2)Represented by 3 bits  by using 2^n while n=3 so 2^3=8.

Base 10:Decimal numbering system

1)Ranges from 0-9

2)Most commonly used in daily life.

1)Ranges from 0-15 Where 10=A,11=B and so on till 15=F

2)Represented by 4 bits.

### 653

The number given above 6 is the most significant number and 3 is the least significant number based on radix of system.

#### Conversion

Decimal       Binary

0                  000

1                   001

2                   010

3                   011

4                   100

5                   101

6                   110

7                   111

### Arithmetic operations

1 1

(3 6 5)8

(2 3 4)8

————-

(6 2 1)8

————-

Note:Addition process first we add 5 and 4 which is 9 but 9 is not present in octal number so subtract base 8 from 9 and forward a carry to next value and so on.

For binary it is following

1 1 1 1 1

(1 0 1 1 0 1)2

(1 1 0 0 1 1)2

(1 1 1 0 0 0 0 0)2

#### Subtraction

Subtraction is different from addition based on compliment technique.

10’s Compliment: Lets understand this concept by an example

7 2 8 4

0 3 9 2

————

————

so its 10’s compliment is subtracting 0392 by 10000 because first value is always 1 bit more than second one.

1 0 0 0 0

0 3 9 2

————-

9 6 0 8 is 10’s compliment

————

9’s Compliment same as above for above example

9 9 9 9

-0 3 9 2

————

9 6 0 7 is 9’s compliment

————-

1’s Compliment of 10101 is 01010 means invert numbers.

2’s Compliment add 1 in 1’s compliment.

A=11001,B=10010 Find A-B

2’s compliment of B is 01110

1 1 0 0 1

0 1 1 1 0

————-

ignore<–1 0 0 1 1 1

—————————

#### Binary codes

1)Alpha-Numeric Code

They can be alphabets and numerical there are total 128 alpha-numeric characters from which 94 are printable and 34 are unprintable.

2)Decimal Code

a)BCD: stands for Binary Coded Decimal where decimal numbers are represented by fixed number of bits.

b)Excess 3 Code it means the binary list started of decimal numbers starts from 3 to 12 so unused states are 1,2,3,13,14,15.

3)Error Detection Code

To find error we used even and odd parity they helped in error detection for this we use additional bits.

Example: for even parity we require 0’s in even quantity and for odd parity 0’s in odd quantity.

4)Grey Code

Is the ordering of the binary number system such that two successive values differ in only one bit. They are designed to prevent the sudden output from electric switches.

Previous page:

Introduction to Digital Systems

http://www.electricalengineering4u.com/digital-logic-design/introduction-to-digital-systems/

Next page

Logic gates

http://www.electricalengineering4u.com/digital-logic-design/logic-gates/