CAS CS 111 Lecture 15: CAS CS 111 B1 October 10 Lecture 15 Notes

124 views21 pages
Verified Note

Document Summary

All types of data are represented in binary. In ps 4, you will write a python function for this. In ps 4, you will write an add_bitwise () function that performs bitwise addition. Recall: we get a separate stack frame for each call. Each return value is sent back to the previous call. We use is to build the next return value, and thus gradually build solutions to larger problems. We again end up with a series of recursive calls: We again build our solution on our way back from the base case: We need to add 11 + 1 to get 100. Example: to add 42 + 9, the computer does bitwise addition: In ps 4, you"ll write a python function for this. In ps 5, you"ll design a circuit for it!! In a computer, each bit is represented as a voltage. 1 is a +5 volts, 0 is 0 volts. Computation is the deliberate combination of these voltages!

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents