Lecture 2 Internal Representations of Numbers PDF
Document Details
Uploaded by WellVoice
UMFST
2024
Tags
Related
- 1 Unit_Data Representation.pdf
- Data Representation and Storage Grade 10 PDF
- Module 2.1 Data Representations In Computer Systems PDF
- Chapter 1 Data Representation & Digital Logic PDF
- Computer Organization and Architecture Lecture 2: Data Representation - Fall 2024 - Mansoura University PDF
- Data Representation Inside Computer PDF
Summary
This lecture covers internal number representations in computers, focusing on integer and real number representation using fixed-point and floating-point methods. It details the concepts, rules, and advantages/disadvantages of these representations.
Full Transcript
Internal representations of numbers Representations of integers: unsigned representation: only for natural numbers signed representations (codes): for integers with sign direct code inverse code (one’s complement) complementary code (two’s complement)...
Internal representations of numbers Representations of integers: unsigned representation: only for natural numbers signed representations (codes): for integers with sign direct code inverse code (one’s complement) complementary code (two’s complement) Representations of real numbers: fixed-point representation floating-point representation Binary representations of integers Unsigned representation Examples of representations and operations on 8 bits Signed representations – codes (direct, inverse, complementary) Direct code Inverse code (one’s complement) Complementary code (two’s complement) Examples of codes on 8 bits Addition and subtraction of integers in complementary code Examples Subunitary convention Codes for signed subunitary numbers Addition and subtraction of subunitary numbers in complementary code Examples addition and subtraction of subunitary numbers Fixed-point representation of real numbers Dimensions of memory location: n = 16,32,64 bits 3 zones of the memory location with predefined dimensions (1,I,F): 1+I+F = n bits the most significant bit (S), position n-1, is the sign bit with the values: 0 for positive numbers and 1 for negative numbers; the decimal point has a fixed position, a virtual one, separating the integer part from the fractional one; Fixed-point representation (contd.) the integer part (I bits) memorizes (aligned to the right relative to the virtual position of the decimal point) the digits of the absolute integer value of the number converted into binary; if I > the number of digits of the binary representation of the absolute integer value of the number, the remaining bits to the left are filled with 0. if I < the number of digits of the binary representation of the absolute value of the number, then the most significant digits of the integer part are lost (!! disadvantage). the fractional part (F bits) memorizes (aligned to the left relative to the virtual position of the decimal point) the digits of the fractional part if F > the number of binary digits of the fractional part then the remaining digits to the right are filled with 0. if F < the number of binary digits of the fractional part then the least significant digits of the fractional part are lost. Fixed-point representation (contd.) Example 1 Example 2 Floating point representation of real numbers used to represent very large and very small numbers with a high precision advantage: if there is an overflow, then the least significant digits are lost Definitions Floating point representation (contd.) IEEE Standards: 11, the number 2530,41.