Formulas used in A/D & D/A conversion

Resolution=Vref/2n … … %Resolution=100%/2
Code= Vin/resolution [truncated] ...Vout=(code)(resolution)
max output =  Vref - resolution  =  Vref  (2n - 1)/2n

Sampling Formula for an input signal of Fin and a  sampling frequency of Fsamp:
 Frequencies out =  (Fin),   (Fsamp + Fin), and  (Fsamp - Fin)

Resolution Diagram

 

1-bit 

2-bit 

3-bit 

4-bit

5-bit 

Vref

 

 

 

 


 31/32


1
    

 
11
  

 
111

1111

11111

15/16

11110

29/32

1110

11101

7/8

11100

27/32

110

1101

11011

13/16

11010

25/32

1100

11001

3/4

11000

23/32

10

101

1011

10111

11/16

10110

21/32

1010

10101

5/8

10100

19/32

100

1001

10011

9/16

10010

17/32

1000

10001

1/2

10000

15/32

0

01

011

0111

01111

7/16

01110

13/32

0110

01101

3/8

01100

11/32

010

0101

01011

5/16

01010

9/32

0100

01001

1/4

01000

7/32

00

001

0011

00111

3/16

00110

5/32

0010

00101

1/8

00100

3/32

000

0001

00011

1/16

00010

1/32

0000

00001

0

00000

rev 11/21/04