• No results found

Highlights previous session

N/A
N/A
Protected

Academic year: 2021

Share "Highlights previous session"

Copied!
4
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Switching Theory / Schakeltechniek 5A050

Lab session Arithmetic

Highlights previous session

A0 00 01 11 1

B0 01 01 01 1

C0 01 01 01 1

Z0 01 01 11 1

C AB

Z A

B Z:

1

1 1 1

1

C

smallest possible 2-level SOP expression / implementation truth

table

K-map

Z = AB + C

expression 2-level implementation

Highlights previous session

A

B X:

x

1 x x

x C 1 1 D 1

1 1 1

1 1

X = A + B

• Don’t cares: extra freedom to reduce the circuit

• Multi-level optimization: smaller circuits but not exact

Block 3

• Number systems

• Arithmetic circuits

(2)

Number Systems

• Decimal system:

– Representation with base 10:

154 = 1 x 102+ 5 x 101+ 4 x 100

– 10 different symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

• Binary system:

– Representation with base 2:

11010 = 1 x 24+ 1 x 23+ 0 x 22+ 1 x 21+ 0 x 20 – 2 different symbols: 0, 1

Conversions

• From binary to decimal:

11010 = 1 x 24+ 1 x 23+ 0 x 22+ 1 x 21+ 0 x 20= 26

• From decimal to binary:

successive division 47 in binary ?

47 / 2 = 23 23 / 2 = 11 11 / 2 = 5 5 / 2 = 2 2 / 2 = 1 1/2 = 0

remainder 1

“ 1

“ 1

“ 1

“ 0“ 1

1 0 1 1 1 1 check: 32 + 8 + 4 + 2 + 1 = 47 !

Arithmetic operations: addition Decimal:

1 1 + 1 69 7 1 1 3

Binary:

1 1 1

1 1 1

+ 0 1 1

1 0 1 0 carries

Arithmetic operations: subtraction Decimal:

-1 - 1 69 5 7 9

Binary:

-1 1 0 1 - 0 1 1 0 1 0

borrows

(3)

Arithmetic circuits: halfadder

Adds two binary numbers:

1 1 + 1 1 0

+ 00 0 0

+ 10 0 1 (2 outputs needed)

+ 01 0 1

B 0 0 1 1 A 0 0 1 1

S 0 1 1 0

C 0 0 0

halfadder

1

HA A

B

S C

AB S

C

Arithmetic circuits: fulladder

B 0 0 1 0 1 0 1 1

Cin 0 0 1 0 1 0 1 1 A 0

0 0 0 1 1 1 1

S 0 1 1 0 1 0 0 1

Cout 0 0 0 0 1 1 1 1

fulladder FA

A

B S

Cin Cout

Arithmetic circuits: ripple carry adder

FA A3 B3

C S3

FA A2 B2

S2

FA A1 B1

S1

HA A0 B0

S0

A3 A2 A1 A0 + B3 B2 B1 B0 C S3 S2 S1 S0 Addition:

Ripple carry adder: example

FA A3 B3

C S3

FA A2 B2

S2

FA A1 B1

S1

HA A0 B0

S0

1 0 1 1 + 0 0 1 1 Addition:

(A)(B) 1 0 0

0 1 1 1

1

0

0

1

1 1

1 1

1 1

1 1 0

1 0

0

(4)

Negative numbers: two’s complement

000

001

010

011 100

101 110

111

Most significant bit:

• 0 for positive numbers

• 1 for negative numbers

0

-2

-3

-4

3 2 -1 1

Negative numbers: two’s complement

2’s complement representation of (decimal) number -p:

• take bit-wise complement of the binary representation of p

• add 1

example: 2’s complement representation of -3

• decimal number p: 3

• binary (2’s complement) representation: 011

• bit-wise complement: 100

• add 1: 101

(consistent with number wheel)

What do you obtain if you apply the conversion to 101 ?

Referenties

GERELATEERDE DOCUMENTEN

• LESA Zorg voor Kwetsbare Ouderen. • Plan van Aanpak Zorg voor

• Thuisartsteksten: kindermishandeling, last van relatieproblemen, opvoedingsproblemen, problemen thuis, vermoeden kindermishan- deling, gemeld bij Veilig Thuis. •

Analysis of chippers using softwoods and bottom dis- charge units showed that there was about a 50% increase in fines content (1% to 1.5%) as new knives aged to mid life, but no

The sulfite cooking liquor is heated only part way to the desired temperature and held with the wood chips until uniform liquor penetration is achieved, particularly in acid

• Inzicht in werkende oplossingen voor beperkingen in kaart; voor en door platform op Onbeperkte Denkers.nl. Belonen, inspireren

Is het misgegaan dan kan de officier van justitie jongeren die zich schuldig hebben gemaakt aan ongewenste sexting naar Halt verwijzen voor de Halt-interventie: Respect

Jian-chun Cheng of Nanjing University in China and his colleagues have now described a possible way to build one consisting of a sandwich of acoustic layers.. Key to the

Because the C–F bond is weaker than the Si–F bond and the Si–H bond weaker than the C–H bond, the switch from C–F to C–H by way of Si is thermodynamically favourable. The