- What is a computer? Explain in words or draw a block diagram. Here is the answer.
- Describe three differences between natural languages and formal languages. Here is the answer.
- Convert to decimal: 1010 Answer: 10
- Convert to decimal: 110111Answer: 55
- Add these binary numbers: 11011 + 101. Answer: 100000
- Convert to binary: 34. Answer: 100010
- Convert to hex: 11000101. Answer: C5
- Convert to binary: 7C Answer: 0111 1100
- Convert to decimal: 2A Answer: 42
- Convert from decimal to hex: 132 Answer: 84
- Describe two characteristics of data determined by data type. Here is the answer.
- Write the contract and header for a function to determine the area of a rectangle,, given its base and height.
;; area-rectangle: number number -> number
(define (area-rectangle length width) ...)
- What value is produced by each of the following functions?
(>= −2 3) produces false
(>= 4 4) produces true
(and (> 3 7) (> 4 2))produces false
- 14. Write a Boolean function for the following: #&x+1<2x-5#&
(< (+ x 1) (− (* 2 x) 5))
Computer Programming Answers to Study Guide For Final