Quiz 6_ Representation_ CMPT130 D100 Introduction to Computer Programming I

pdf

School

Douglas College *

*We aren’t endorsed by this school

Course

130

Subject

Computer Science

Date

Dec 6, 2023

Type

pdf

Pages

8

Uploaded by LieutenantSparrow1721

Report
12/7/21, 3:12 PM Quiz 6: Representation: CMPT130 D100 Introduction to Computer Programming I https://canvas.sfu.ca/courses/64792/quizzes/178192 1/8 Quiz 6: Representation Due Oct 30 at 11:59am Points 12 Questions 12 Available Oct 29 at 11:30am - Oct 30 at 11:59am 1 day Time Limit 30 Minutes This quiz was locked Oct 30 at 11:59am. Attempt History Attempt Time Score LATEST Attempt 1 27 minutes 6 out of 12 Score for this quiz: 6 out of 12 Submitted Oct 29 at 10:36pm This attempt took 27 minutes. 0 / 1 pts Question 1 Which type can store all the values between 1.01 and 1.02? 1. float 2. double 3. long double 2 and 3 You Answered You Answered none of them orrect Answer orrect Answer 3 1 2 all of them
12/7/21, 3:12 PM Quiz 6: Representation: CMPT130 D100 Introduction to Computer Programming I https://canvas.sfu.ca/courses/64792/quizzes/178192 2/8 0 / 1 pts Question 2 Which type can store a reasonable approximation of 20! (20 factorial)? 1. int 2. float 3. double 2 and 3 orrect Answer orrect Answer all of them 2 none of them 1 You Answered You Answered 3 1 / 1 pts Question 3 What data type should the result variable be declared as to best hold the result of the following C++ statement? result = "5.1" + "10,1"; string Correct! Correct! int any of these types char
12/7/21, 3:12 PM Quiz 6: Representation: CMPT130 D100 Introduction to Computer Programming I https://canvas.sfu.ca/courses/64792/quizzes/178192 3/8 double Note that the two operands to + are strings. 0 / 1 pts Question 4 What might be represented by the bit pattern shown below? 0000 0010 1101 1101 0010 1111 0011 1011 1. An integer 2. A floating point number 3. The colour of a pixel 2 all of them orrect Answer orrect Answer 1 and 2 none of them 1 and 3 2 and 3 3 1 You Answered You Answered 1 / 1 pts Question 5
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
12/7/21, 3:12 PM Quiz 6: Representation: CMPT130 D100 Introduction to Computer Programming I https://canvas.sfu.ca/courses/64792/quizzes/178192 4/8 Which of the following 7 bit 2's complement values has the largest absolute value? 000 0000 111 0011 001 0011 100 0011 Correct! Correct! 010 1110 0 / 1 pts Question 6 What pixel colour is represented by the bit pattern shown below? Assume that pixels are 4 byte RGB values with the right-most byte representing transparency. 0101 0101 0101 0101 0101 0101 1111 1111 red grey orrect Answer orrect Answer blue green You Answered You Answered aqua purple yellow
12/7/21, 3:12 PM Quiz 6: Representation: CMPT130 D100 Introduction to Computer Programming I https://canvas.sfu.ca/courses/64792/quizzes/178192 5/8 1 / 1 pts Question 7 Which of the following 7 bit 2's complement values has the largest absolute value? 011 1101 101 1010 100 0000 Correct! Correct! 110 1111 001 0110 1 / 1 pts Question 8 Of the three 8 bit 2's complement numbers shown below which represent positive odd numbers? 1. 1001 0011 2. 0111 1110 3. 1101 0111 all of them none of them Correct! Correct! 1 and 3 1 2 3
12/7/21, 3:12 PM Quiz 6: Representation: CMPT130 D100 Introduction to Computer Programming I https://canvas.sfu.ca/courses/64792/quizzes/178192 6/8 1 / 1 pts Question 9 Of the three 8 bit 2's complement numbers shown below which represent negative numbers? 1. 1001 0011 2. 1111 1110 3. 0101 0111 none of them 2 1 1 and 2 Correct! Correct! 3 all of them 0 / 1 pts Question 10 If the symbols used to represent a base 13 number followed the same pattern as hexadecimal numbers (0, 1, 2, ..., A, B, ...), what would the symbol E represent? 13 it would be invalid orrect Answer orrect Answer 0
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
12/7/21, 3:12 PM Quiz 6: Representation: CMPT130 D100 Introduction to Computer Programming I https://canvas.sfu.ca/courses/64792/quizzes/178192 7/8 10 12 You Answered You Answered 1 / 1 pts Question 11 Of the three 8 bit 2's complement numbers shown below which represent positive even numbers? 1. 1001 0010 2. 0011 0011 3. 0101 0110 1 3 Correct! Correct! all of them 2 2 and 3 none of them 0 / 1 pts Question 12 If the symbols used to represent a base 19 number followed the same pattern as hexadecimal numbers (0, 1, 2, ..., A, B, ...), what would the symbol H represent? it would be invalid
12/7/21, 3:12 PM Quiz 6: Representation: CMPT130 D100 Introduction to Computer Programming I https://canvas.sfu.ca/courses/64792/quizzes/178192 8/8 18 You Answered You Answered 17 orrect Answer orrect Answer 16 0 Quiz Score: 6 out of 12