{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

fa10_hw1_solutions

# fa10_hw1_solutions - CS231 Fall 2010 Homework 1 solutions...

This preview shows pages 1–4. Sign up to view the full content.

CS231 Fall 2010 Homework 1 solutions Due at 5:00pm, Wednesday, September 8, 2010 CS 231 drop box, Siebel Center (in basement)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
1. Base Conversions (30 points) Show the detailed steps involved in the following base conversions. Solve for X. You must show your work to get credit. a. 101001001 2 = X 10 329 b. 188 10 = X 2 10111100 c. 22602 8 = X 16 2582 d. FACE 16 = X 8 175316 e. 4335 8 = X 10 2269 f. 10 . 75 10 = X 2 1010.11 g. 1100 . 101 2 = X 10 12.625 h. B 36 . 9 B 7 16 = X 8 5466.4667 i. 2347 . 5423 8 = X 16 4E7.B13 2. Binary Integers (2+3+3 = 8 points) What is the decimal equivalent of the largest unsigned binary integer that can be obtained from: For these, it’s okay to have a limited set of significant figures a. 1 bit 1 (2 1 - 1) b. 32 bits 4294967295 (2 32 - 1) c. 64 bits 18446744073709551615 (2 64 - 1) ( Food for Thought : Can you remember where you usually see these bit numbers. You have single bit flags, 32 bit and 64 bit processors. Can you think of any significance of the phrase ”32 bit” processors? Please do NOT include the answer of the ”food for thought” question in your submission; its just a thought you can ponder upon. You will NOT be provided any marks for answering this extra part.) 3. Statement Expression Truth Table | Simplification State- ment (12 points) Below is an if statement written in C that describes a bird’s decision on whether to migrate, based on whether or not the bird has mates in area, availability of food, or if there are nearby predators. The operators &&, || , and ! correspond to AND, OR, and NOT, respectively. 1
if ( (!mates && !food && predators) || (!food && (mates || predators)) || (predators && !(mates || food ))) { migrate(); } a. Express the condition as a Boolean function of G . You may abbreviate M (for mates), F (for food),

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 8

fa10_hw1_solutions - CS231 Fall 2010 Homework 1 solutions...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online