Docsity

Computer Science and Engineering Sampler - Introduction Engineering | ENGR 100, Exams of Engineering

Toggle sidebar
bg1
ENGR 100 1 Peter Chen
Computer science and engineering sampler
You’ve gotten a taste of computer science and engineering, but
there’s a lot more:
• achieve the same functionality while using fewer
resources
• achieve better results with the same resources
• achieve results that one would think impossible
• find that some things that appear possible are impossible
Logic minimization
We showed one way how to express a combinational logic
function (sum of products). Can we implement the same
function with much less hardware?
pf3
pf4
pf5

Partial preview of the text

Download Computer Science and Engineering Sampler - Introduction Engineering | ENGR 100 and more Exams Engineering in PDF only on Docsity!

Computer science and engineering sampler

You’ve gotten a taste of computer science and engineering, but

there’s a lot more:

• achieve the same functionality while using fewer

resources

• achieve better results with the same resources

• achieve results that one would think impossible

• find that some things that appear possible are impossible

Logic minimization

We showed one way how to express a combinational logic

function (sum of products). Can we implement the same

function with much less hardware?

Comparison of two 2-bit numbers

Standard form to express this combinational logic function

Can simplify to

A1 A0 B1 B0 A<B

Error correcting codes

We’ve assumed data is stored perfectly

• what if memory sometimes developed errors?

• e.g. you stored 1100 2 , but the memory spontaneously

changed this to 1101 2

Can I detect and correct these errors by storing extra informa-

tion?

Does it work to store the number twice (100% overhead)?

How many extra bits does it take to enable error correction?

Data structures

Consider writing a program to sort a set of values

for n iterations { find the maximum in the remaining values [this takes about n iterations] append the max to the set of sorted values delete the max from the original set }

How many iterations total, e.g. for a set of 10^6 elements?

How fast can we do the same task?

Recursion

Some mathematical functions are defined recursively (in terms

of themselves)

factorial(n) = 1 if n== n * factorial(n-1) if n>

We can write programs in the same style

int factorial(int n) { if (n == 0) { return(1); } else { return(n * factorial(n-1)); } }

Will this work with our E100 programming style?

Parallel programming

E100 isn’t fast enough for all applications. What if you had

multiple E100 processors?

Parallel programming is important

• Most modern microprocessor chips have multiple “cores”

Parallel programming is hard

A simple program:

add x y num sub y x num

What are the final values of x and y?

What if each instruction ran on a separate E100?

Self-reproducing program

Can you write a program that, when run, will output its own

source code?

This one is close, but not quite

#include main() { std::cout << "#include \nmain()\n{\nstd::cout\n}\n"; }

What output does the above program produce?

Is it possible to write such a program?

Virtualization

We provided a single processor, small memory, and limited I/O

How can we make it look like (to a program) that there is an

arbitrary number of processors, memory, network cards

(without adding more hardware)?

Many more interesting topics

• How does the Cyclone II FPGA implement arbitrary

combinational and sequential logic?

• How to design and verify a system with a billion compo-

nents?

• How to insert a new sound sample in our set without

shifting the others down?

• How to allow multiple users to use the same computer,

share the same hardware, yet prevent them from mess-

ing up each other’s data?

• How to send messages securely over a communication

channel that an attacker controls (can eavesdrop, mod-

ify, delete, or insert messages)?

• How to make a bunch of computers look like a single,

more powerful one?