cs1101_09A_lec15 - CS1101 - Lec02 1 Bytes Representing Real...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS1101 - Lec02 1 Bytes Representing Real Numbers An integer does not have any decimal poin ts, a real number will have a decimal point Floating point notation for real numbers Similar to scientific notation 20,000 could be written as 2.0 x 104-0.0034 could be written as -3.4 x 10-3 The IEEE Standard for Binary Floating-Point A rithmetic or IEEE 754 (reference [4])-3.4 is the mantissa or significand -3 is the exponent CS1101 - Lec02 2 IEEE Floating Point Standard Let s = +1 (positive numbers) when the sign bit is 0 s = 1 (negative numbers) when the sign bit is 1 Let e = exponent - 127 Let m = 1 .mantissa in binary The number's value v is: v = s x 2e x m More details see reference [4] CS1101 - Lec02 3 Bytes Representing Text Each character (letter, punctu ation, etc.) is assigned a uniqu e bit pattern (binary number) ASCII : Uses patterns of 7-bits to represent most symbols us ed in written English text...
View Full Document

This note was uploaded on 03/10/2012 for the course CS 1101 taught by Professor Drxue during the Spring '11 term at City University of Hong Kong.

Page1 / 6

cs1101_09A_lec15 - CS1101 - Lec02 1 Bytes Representing Real...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online