• Tidak ada hasil yang ditemukan

DATA STORAGE

N/A
N/A
Protected

Academic year: 2025

Membagikan "DATA STORAGE"

Copied!
5
0
0

Teks penuh

(1)

DATA

DATA STORAGE STORAGE DATA

DATA STORAGE STORAGE

CHAPTER III CHAPTER III

LECTURE I LECTURE III LECTURE I LECTURE III

Week

Week 4 4

(2)

Different system for representing (storing) integer in Different system for representing (storing) integer in

memory memory Unsigned Representation

Unsigned Representation

Unsigned integer is an integer that can never be Unsigned integer is an integer that can never be negative and take only

negative and take only 0 0 or positive value. Its range is or positive value. Its range is between

between 0 0 and positive infinity.and positive infinity.

We use the maximum unsigned integer to define the We use the maximum unsigned integer to define the number of bits we can use to store this number.

number of bits we can use to store this number.

Example:

Example:a p e:a p e:

If we have

If we have 4 4 bits so the maximum unbits so the maximum un--singed integer singed integer

(3)

Storing unsigned integer: we use the following Storing unsigned integer: we use the following steps

steps 1

1) Integer is changed to binary ) Integer is changed to binary 2

2) If the number of bits is less than n, ) If the number of bits is less than n, 0 0s are s are added to the left of the binary integer so that added to the left of the binary integer so that added to the left of the binary integer so that added to the left of the binary integer so that there is a total of n b its

there is a total of n b its 3

3) f h ) f h b b f bi f bi i i h h h h 3

3) If the number of bits is greater than n, then ) If the number of bits is greater than n, then the integer cannot be stored, and in this case the integer cannot be stored, and in this case we will have an overflow.

we will have an overflow.

(4)

Example:

Example:pp

Assume we have a memory location with

Assume we have a memory location with 88--bit store the bit store the following numbers

following numbers 1

1) ) 7 7 n=

n=88bit bit 88 77 66 55 44 33 22 11 Change

Change 7 7 to binary to binary 1 1 11 1 1 Add five bits to the left:

Add five bits to the left: 00 0 0 0 00 0 0 0 11 11 11 Add five bits to the left:

Add five bits to the left: 0 0 0 0 0 1 1 10 0 0 0 0 1 1 1

(5)

2

2) Change ) Change 258 258 to binaryto binary

1 1 2

2 3

3 4

4 5

5 6

6 7

7 8

n= 8

n=88bit bit 88 77 66 55 44 33 22 11 Change

Change 258 258 into binary into binary

0 0 1

1 0

0 0

0 0

0 0

0 0

0 0

0

1

Overflow Overflow

Due to size limitation, the allocated number of bits and Due to size limitation, the allocated number of bits and the range of integers that can be represented is limited.

the range of integers that can be represented is limited.

In an n

In an n--bit memory location we can only store an bit memory location we can only store an unsigned integer between

unsigned integer between 0 0 and and 22nn--11

Referensi

Dokumen terkait

The research was conducted with the fol- lowing steps: (1) Delineating sub watershed using contur and river network map, (2) Land cover/land use information obtained

Although management mass data storage is generally used for large businesses, many individuals or families use floppy disks as a way to store their important personal

In the following sections, we identify specific use cases that exploit the value of this information, and contribute to operational efficiency, a better customer experience, or

This strategy is used is utilized for storing and retrieving new information. The steps taken by learners in relation to memory methods must be

At present, it is important to take the following steps aimed at legal regulation of the use of artificial intelligence: – consider the possibility of creating a legal act regulating

Int Data Type In Python, the int data type is a numeric type used to represent whole integer number as opposition with float number.. Creating a int is done by using the whole integer

Algorithm for Binary Search based on the following three cases: Case 1: If the key is less than the middle element, recursively search the key in the first half of the array.. Case 2:

The Use of Different Colors in Mind Mapping Activities Buzan, 2010: 36 This mind mapping technique is carried out in the counseling process, with the following steps; 1 building