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 Computer Architecture and Organization

A course syllabus for Fundamentals of Computer Systems at Columbia University in Fall 2015. The course covers topics such as computer systems, digital circuits, logic, and architecture. The syllabus includes administrative information, office hours, and recommended texts. The document also includes examples of binary and hexadecimal numbers, as well as algorithms for addition in decimal and binary. The typology of the document is 'lecture notes'.

Typology: Lecture notes

2014/2015

Uploaded on 05/11/2023

anarghya
anarghya 🇺🇸

4.2

(19)

10 documents

1 / 39

Toggle sidebar

Related documents


Partial preview of the text

Download Fundamentals of Computer Systems and more Lecture notes Computer Architecture and Organization in PDF only on Docsity! Fundamentals of Computer Systems Thinking Digitally Martha A. Kim Columbia University Fall 2015 1 / 28 Computer Systems Work Because of Abstraction Application Software Operating Systems Architecture Micro-Architecture Logic Digital Circuits Analog Circuits Devices Physics 2 / 28 Simple information processing system Discrete Information Processing System System State Discrete Inputs Discrete Outputs First quarter of the course 3 / 28 Administrative Items http://www.cs.columbia.edu/~martha/courses/3827/au15/ https://piazza.com/class/idq5hhzggizmq Prof. Martha A. Kim martha@cs.columbia.edu 469 Computer Science Building Lectures 10:10–11:25 AM Tue, Thur 501 Schermerhorn Hall Sep 8–Dec 10 Holidays: Nov 3 (Election Day), Nov 26 (Thanksgiving) 4 / 28 Office Hours The six (and counting) TAs and I will all offer office hours. Always consult the course calendar (linked from course webpage) for the latest schedule. https://www.google.com/calendar/embed?src=8g48vdedcbb85k7jn4orpu48mg%40group.calendar.google.com 5 / 28 The Text(s): Alternative #1 No required text. There are two recommended alternatives. É David Harris and Sarah Harris. Digital Design and Computer Architecture. Almost precisely right for the scope of this class: digital logic and computer architecture. 8 / 28 The Text(s): Alternative #2 É M. Morris Mano and Charles Kime. Logic and Computer Design Fundamentals, 4th ed. É Computer Organization and Design, The Hardware/Software Interface, 4th ed. David A. Patterson and John L. Hennessy 9 / 28 th in kg ee k. co m 10 / 28 Hexadecimal, Decimal, Octal, and Binary Hex Dec Oct Bin 0 0 0 0 1 1 1 1 2 2 2 10 3 3 3 11 4 4 4 100 5 5 5 101 6 6 6 110 7 7 7 111 8 8 10 1000 9 9 11 1001 A 10 12 1010 B 11 13 1011 C 12 14 1100 D 13 15 1101 E 14 16 1110 F 15 17 1111 13 / 28 Binary and Octal D E C PD P- 8 /I , c. 1 9 6 8 Oct Bin 0 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111 PC = 0× 211 + 1× 210 + 0× 29 + 1× 28 + 1× 27 + 0× 26 + 1× 25 + 1× 24 + 1× 23 + 1× 22 + 0× 21 + 1× 20 = 2× 83 + 6× 82 + 7× 81 + 5× 80 = 146910 14 / 28 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 15 / 28 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 18 / 28 Decimal Addition Algorithm 1 1 434 +628 106 2 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 18 / 28 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 18 / 28 Binary Addition Algorithm 10011 10011 +11001 101100 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 19 / 28 Binary Addition Algorithm 1001 1 10011 +11001 10110 0 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 19 / 28 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 19 / 28 Binary Addition Algorithm 10011 10011 +11001 101100 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 19 / 28 Signed Numbers: Dealing with Negativity How should both positive and negative numbers be represented? 20 / 28 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. 21 / 28 Two’s Complement Numbers Really neat trick: make the most significant bit represent a negative number instead of positive: 11012 = −8+ 4+ 1 = −3 11112 = −8+ 4+ 2+ 1 = −1 01112 = 4+ 2+ 1 = 7 10002 = −8 Easy addition: just add in binary and discard any carry. Negation: complement each bit (as in one’s complement) then add 1. Very good property: no −0 Two’s complement numbers are equal if all their bits are the same. 24 / 28 Number Representations Compared Bits Binary Signed One’s Two’s Mag. Comp. Comp. 0000 0 0 0 0 0001 1 1 1 1 ... 0111 7 7 7 7 1000 8 −0 −7 −8 1001 9 −1 −6 −7 ... 1110 14 −6 −1 −2 1111 15 −7 −0 −1 Smallest number Largest number 25 / 28 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 26 / 28
Docsity logo



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