ikerhurtado.com
You're in
Iker Hurtado's pro blog
Developer | Entrepreneur | Investor
Software engineer (entrepreneur and investor at times). These days doing performant frontend and graphics on the web platform at Barcelona Supercomputing Center

The Hw/Sw Interface. Section 2: Integer and Floating Point Numbers

30 Nov 2015   |   iker hurtado  
Share on Twitter Share on Google+ Share on Facebook
These are my notes on the section 2 of the course (Coursera): The Hardware/Software Interface (by Gaetano Borriello, Luis Ceze - University of Washington)

I was clear about the concepts explained in the first two lectures of this section: encodings and representation of integers; so, I've not extracted content from those parts.

Regarding to the work with integers in C, the details about signed-unsigned integer casting and automatic sign extension attracted my attention.

Signed-unsigned integer casting

There are explicit and implicit (via assignments and function calls) castings.

In casting between signed and unsigned integers bits are unchanged, just interpreted differently.

Sign extension in C

Floating-point

I studied the floating-point representation in detail some time ago, but this course touches on the floating-point operations too. I extract the three main slides:


Interesting the slide about floating-point types and their casting in C:


POST A COMMENT: