Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Fundamentals of Computer Systems, Lecture notes of Algorithms and Programming

A course syllabus for Fundamentals of Computer Systems at Columbia University in Fall 2011. The course covers topics such as engineering abstraction, application software, operating systems, architecture, micro-architecture, logic, digital circuits, analog circuits, and devices. The document also includes information on assignments and grading, as well as examples of numbering systems and addition algorithms. The typology of this document is 'lecture notes'.

Typology: Lecture notes

2010/2011

Uploaded on 05/11/2023

anasooya
anasooya 🇺🇸

4

(12)

8 documents

1 / 44

Toggle sidebar

Related documents


Partial preview of the text

Download Fundamentals of Computer Systems and more Lecture notes Algorithms and Programming in PDF only on Docsity! Fundamentals of Computer Systems Thinking Digitally Stephen A. Edwards Columbia University Fall 2011 The Subject s of this Class 0 1 Engineering Works Because of Abstraction Application Software COMS 3157, 4156, et al. Operating Systems COMS W4118 Architecture Second Half of 3827 Micro-Architecture Second Half of 3827 Logic First Half of 3827 Digital Circuits First Half of 3827 Analog Circuits ELEN 3331 Devices ELEN 3106 Physics ELEN 3106 et al. Boring Stuff http://www.cs.columbia.edu/~sedwards/classes/2011/3827-fall/ Prof. Stephen A. Edwards sedwards@cs.columbia.edu 462 Computer Science Building Class meets 10:35–11:50 AM Tuesdays and Thursdays in 633 Mudd Lectures Sep 6–Dec 8 Holidays: Nov 8, Nov 24 Assignments and Grading Weight What When 40% Six homeworks See Webpage 30% Midterm exam October 25th 30% Final exam 9–12, December 20th Homework is due at the beginning of lecture. I will drop the lowest of your six homework scores; you can                        skip omit forget ignore blow off screw up feed to dog flake out on sleep through                        one with no penalty. Oat =larcWee l=) A At AO A 983 of people in the world: Those who understand binary and those who don't. thinkgeek.com Which Numbering System Should We Use? Some Older Choices: Roman: I II III IV V VI VII VIII IX X Mayan: base 20, Shell = 0 Babylonian: base 60 The Decimal Positional Numbering System Ten figures: 0 1 2 3 4 5 6 7 8 9 7× 102 + 3× 101 + 0× 100 = 73010 9× 102 + 9× 101 + 0× 100 = 99010 Why base ten? Hexadecimal Numbers Base 16: 0 1 2 3 4 5 6 7 8 9 A B C D E F Instead of groups of 3 bits (octal), Hex uses groups of 4. CAFEF00D16 = 12× 167 + 10× 166 + 15× 165 + 14× 164 + 15× 163 + 0× 162 + 0× 161 + 13× 160 = 3,405,705,22910 C A F E F 0 0 D Hex 11001010111111101111000000001101 Binary 3 1 2 7 7 5 7 0 0 1 5 Octal Computers Rarely Manipulate True Numbers Infinite memory still very expensive Finite-precision numbers typical 32-bit processor: naturally manipulates 32-bit numbers 64-bit processor: naturally manipulates 64-bit numbers How many different numbers can you represent with 5 binary octal decimal hexadecimal digits? Jargon Bit Binary digit: 0 or 1 Byte Eight bits Word Natural number of bits for the pro- cessor, e.g., 16, 32, 64 LSB Least Significant Bit (“rightmost”) MSB Most Significant Bit (“leftmost”) Decimal Addition Algorithm 1 1 434 +628 10 62 4+ 8 = 12 1+ 3+ 2 = 6 4+ 6 = 10 + 0 1 2 3 4 5 6 7 8 9 0 0 1 2 3 4 5 6 7 8 9 1 1 2 3 4 5 6 7 8 9 10 2 2 3 4 5 6 7 8 9 10 11 3 3 4 5 6 7 8 9 10 11 12 4 4 5 6 7 8 9 10 11 12 13 5 5 6 7 8 9 10 11 12 13 14 6 6 7 8 9 10 11 12 13 14 15 7 7 8 9 10 11 12 13 14 15 16 8 8 9 10 11 12 13 14 15 16 17 9 9 10 11 12 13 14 15 16 17 18 10 10 11 12 13 14 15 16 17 18 19 Decimal Addition Algorithm 1 1 434 +628 1 062 4+ 8 = 12 1+ 3+ 2 = 6 4+ 6 = 10 + 0 1 2 3 4 5 6 7 8 9 0 0 1 2 3 4 5 6 7 8 9 1 1 2 3 4 5 6 7 8 9 10 2 2 3 4 5 6 7 8 9 10 11 3 3 4 5 6 7 8 9 10 11 12 4 4 5 6 7 8 9 10 11 12 13 5 5 6 7 8 9 10 11 12 13 14 6 6 7 8 9 10 11 12 13 14 15 7 7 8 9 10 11 12 13 14 15 16 8 8 9 10 11 12 13 14 15 16 17 9 9 10 11 12 13 14 15 16 17 18 10 10 11 12 13 14 15 16 17 18 19 Decimal Addition Algorithm 1 1 434 +628 1062 4+ 8 = 12 1+ 3+ 2 = 6 4+ 6 = 10 + 0 1 2 3 4 5 6 7 8 9 0 0 1 2 3 4 5 6 7 8 9 1 1 2 3 4 5 6 7 8 9 10 2 2 3 4 5 6 7 8 9 10 11 3 3 4 5 6 7 8 9 10 11 12 4 4 5 6 7 8 9 10 11 12 13 5 5 6 7 8 9 10 11 12 13 14 6 6 7 8 9 10 11 12 13 14 15 7 7 8 9 10 11 12 13 14 15 16 8 8 9 10 11 12 13 14 15 16 17 9 9 10 11 12 13 14 15 16 17 18 10 10 11 12 13 14 15 16 17 18 19 Binary Addition Algorithm 100 11 10011 +11001 1011 00 1+ 1 = 10 1+ 1+ 0 = 10 1+ 0+ 0 = 01 0+ 0+ 1 = 01 0+ 1+ 1 = 10 + 0 1 0 00 01 1 01 10 10 10 11 Binary Addition Algorithm 10 011 10011 +11001 101 100 1+ 1 = 10 1+ 1+ 0 = 10 1+ 0+ 0 = 01 0+ 0+ 1 = 01 0+ 1+ 1 = 10 + 0 1 0 00 01 1 01 10 10 10 11 Binary Addition Algorithm 1 0011 10011 +11001 10 1100 1+ 1 = 10 1+ 1+ 0 = 10 1+ 0+ 0 = 01 0+ 0+ 1 = 01 0+ 1+ 1 = 10 + 0 1 0 00 01 1 01 10 10 10 11 Signed Magnitude Numbers You are most familiar with this: negative numbers have a leading − In binary, a leading 1 means negative: 00002 = 0 00102 = 2 10102 = −2 11112 = −7 10002 = −0? Can be made to work, but addition is annoying: If the signs match, add the magnitudes and use the same sign. If the signs differ, subtract the smaller number from the larger; return the sign of the larger. One’s Complement Numbers Like Signed Magnitude, a leading 1 indicates a negative One’s Complement number. To negate a number, complement (flip) each bit. 00002 = 0 00102 = 2 11012 = −2 10002 = −7 11112 = −0? Addition is nicer: just add the one’s complement numbers as if they were normal binary. Really annoying having a −0: two numbers are equal if their bits are the same or if one is 0 and the other is −0. aren 4 EQUAL Ee ou Fan t ZERO CALORIES. MAXIMUM PEPSI'TASTE. 4 Fixed-point Numbers How to represent fractional numbers? In decimal, we continue with negative powers of 10: 31.4159 = 3× 101 + 1× 100 + 4× 10−1 + 1× 10−2 + 5× 10−3 + 9× 10−4 The same trick works in binary: 1011.01102 = 1× 23 + 0× 22 + 1× 21 + 1× 20 + 0× 2−1 + 1× 2−2 + 1× 2−3 + 0× 2−4 = 8+ 2+ 1+ 0.25+ 0.125 = 11.375 F F a u c Interesting The ancient Egyptians used binary fractions: The Eye of Horus Floating-point Numbers How can we represent very large and small numbers with few bits? Floating-point numbers: a kind of scientific notation IEEE-754 floating-point numbers: 1 ︸︷︷︸ sign 10000001 ︸ ︷︷ ︸ exponent 01100000000000000000000 ︸ ︷︷ ︸ significand = −1.0112 × 2129−127 = −1.375× 4 = −5.5 BCD Addition Binary addition followed by a possible correction. Any four-bit group greater than 9 must have 6 added to it. Example: 11 158 +242 400 1 1 000101011000 +001001000010 1010 First group + 0110 Correction 10100000 Second group + 0110 Correction 01000000 Third group (No correction) 010000000000 Result BCD Addition Binary addition followed by a possible correction. Any four-bit group greater than 9 must have 6 added to it. Example: 1 1 158 +242 40 0 1 1 000101011000 +001001000010 1010 First group + 0110 Correction 10100000 Second group + 0110 Correction 01000000 Third group (No correction) 010000000000 Result BCD Addition Binary addition followed by a possible correction. Any four-bit group greater than 9 must have 6 added to it. Example: 1 1 158 +242 40 0 1 1 000101011000 +001001000010 1010 First group + 0110 Correction 10100000 Second group + 0110 Correction 01000000 Third group (No correction) 010000000000 Result
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved