Shreyas’ Notes

Fundamentals of Computer Engineering

ELEC 220

spring, freshman year

Combine CS and EE to design and implement an optimized computing system.

control+datapath=processor\textrm{control} + \textrm{datapath} = \textrm{processor}

History §

Babbage §

Binary §

Unsigned binary integers §

x=xn12n1+xn22n2++x020x = x_{n - 1} 2^{n - 1} + x_{n - 2} 2^{n - 2} + \cdots + x_0 2^0

2’s complement signed integers §

x=xn12n1+xn22(n2)++x020x = -x_{n - 1}2^{n - 1} + x_{n-2} 2^(n-2) + \cdots + x_0 2^0

MSB is the sign bit.

0=0000000020 = {0000\cdots 0000}_2

1=111111112-1 = {1111\cdots 1111}_2

range: 2n1-2^{n-1} to +2n11+2^{n-1} - 1

Overflow §

Sign extension §

move 2’s complement signed int from smaller to larger container: replicate the sign to the left

Floating Points §

IEEE 754-1985 standard.

x=(1)sign×(1+fraction)×2exponentbiasx = (-1)^{\mathrm{sign}} \times (1 + \mathrm{fraction}) \times 2^{\mathrm{exponent} - \mathrm{bias}}

special cases

Memory §

Byte ordering §

Addresses, data.