Ryerson University

Ryerson University
Department of Computer Science
CPS118 F2017 Sections 6/7/8/9/10/11/12/13
INTRODUCTORY PROGRAMMING FOR SCIENTISTS


FAQ (Frequently Asked Questions)


Email questions of general interest to our sections (6/7/8/9/10/11/12/13) will be answered (anonymously) on D2L.

See the Course Coordinator's CPS118 web site for additional information about the course.

Only infrequently (if ever) will additional questions be dealt with here. Refer to D2L.




1. Q: The material on internal storage forms is reasonably complex. How much should be known?
A: This material has appeared on tests and should be understood. Students should especially understand the distinctions between storing a number in the different ways. Consider the number 7 stored as an int, as a float, and as a char.

In class you will see pages which will show the number 7 as a (signed) 4 byte integer
[0000 0000   0000 0000   0000 0000   0000 0111],
as a 4 byte floating point number
[0100 0000   1110 0000   0000 0000   0000 0000],
and as a one byte character
[0011 0111].

Be sure to understand completely why these distinctions occur. You will additionally have to know how the negatives are stored for the two types of numeric value. Further be aware that the floating point numbers are being shown in their 4 byte form only for simplicity - in reality they are usually stored in their 8 byte form. You will be responsible for knowing only the 4 byte form.