CS 61C: Great Ideas in Computer Architecture Lecture 2 ...
[Pages:52]CS 61C: Great Ideas in Computer Architecture
Lecture 2: Numbers & C Language
Krste Asanovi & Randy Katz
Agenda
? Numbers wrap-up ? This is not on the exam! ? Break ? C Primer ? Administrivia, Break ? C Type declarations ? And in Conclusion, ...
CS 61c
Lecture 2: C Programming Language
2
Recap: Binary Number Conversion
Binary ? Decimal
Decimal ? Binary
1001010two = ?ten
74ten = ?two
Binary Decimal Value
Decimal Binary (odd?)
Digit
74
0
0
0 x 20 = 0
/2 = 37
1
1
1 x 21 = 2
/2 = 18
0
0
0 x 22 = 0
/2 = 9
1
1
1 x 23 = 8
/2 = 4
0
0
0 x 24 = 0
/2 = 2
0
0
0 x 25 = 0
/2 = 1
1
1
1 x 26 = 64
S = 74ten
Collect ? 1001010two
9/6/17
Fall 2017 - Lecture #1
3
Signed Integer Representation
How to represent -5? Sign & magnitude (8-bit example):
sign
7-bit magnitude (0 ... 127)
Rules for addition, a + b:
? If (a>0 and b>0): add b to a ? If (a>0 and b ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- python beginner tutorials
- sets and set operations university of pittsburgh
- how to code in python 3
- 1 write a program that displays the sum of two numbers
- 20 180 python mit opencourseware
- python lesson 1 tufts university
- python lab 3 2d arrays and plotting university of york
- the real numbers and the integers
- cs 61c great ideas in computer architecture lecture 2
- introduction to programming with jes
Related searches
- emerging computer architecture technology
- computer architecture tutorial pdf
- computer architecture pdf
- computer architecture and design pdf
- fundamentals of computer architecture pdf
- william stallings computer architecture pdf
- computer architecture textbook pdf
- computer architecture tutorial for beginners
- computer architecture and organization pdf
- computer architecture lecture notes
- computer networks lecture notes pdf
- computer architecture book pdf download