Download presentation
Presentation is loading. Please wait.
Published byAntony Parsons Modified over 9 years ago
1
For example the integer 112989 represented by 32 bits would look like this in binary notation. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 1 0 0 1 Integers, as well as numbers with decimals, and character sets are represented by Binary code The WREXISTS attribute in the IDU layer is an integer that is represented by 32 bits, or a collection of 32 ones and zeros. Please follow this link for more detail (http://en.wikipedia.org/wiki/Binary_number )
2
From the wiki page we know that binary notation is base two, thus: 2 0 =1 2 1 =2 2 2 =4 2 3 =8 2 4 =16 2 5 =32 2 6 =64 2 7 =128 2 8 =256 2 9 =512 2 10 =1024. 2 31 =2147483648
3
For example the 32 bit integer 0 would look like this in binary notation 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 For example the 32 bit integer 1 (2 0 ) would look like this in binary notation 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 For example the 32 bit integer 2 (2 1 ) would look like this in binary notation 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 For example the 32 bit integer 4 (2 2 ) would look like this in binary notation 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 For example the 32 bit integer 8 (2 3 ) would look like this in binary notation 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 For example the 32 bit integer 16 (2 4 ) would look like this in binary notation 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 For example the 32 bit integer 32 (2 5 ) would look like this in binary notation 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 For example the 32 bit integer 64 (2 6 ) would look like this in binary notation 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 For example the 32 bit integer 128 (2 7 ) would look like this in binary notation 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 For example the 32 bit integer 512 (2 8 ) would look like this in binary notation 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0. For example the 32 bit integer 2147483648 (2 31 ) would look like this in binary notation 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Notice the pattern for base two integers that starts from the right side of the 32 bit binary notation.
4
The WREXISTS attribute in the IDU layer is an integer that is represented by 32 bits, or a collection of 32 ones and zeros. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 1 0 0 1 Integers can also be represented by 16 bits 1 0 1 0 1 1 0 0 1 0 0 1 1 0 0 1 Integers can also be represented by 8 bits 0 0 0 1 0 1 0
5
For example the integer 112989 represented by 32 bits would look like this in binary notation. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 1 0 0 1 For the integer 112989 start thinking about the positions of the 1s and 0s as flags (true or false) set at certain positions in 32 bit integer For example in the integer 112989 there is a flag (true) set at the binary position 2 0, 2 3, 2 4, 2 10, 2 11, and 2 13 A slight shift in thinking is needed here
6
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 The WREXISTS attribute in the IDU layer is an integer that is represented by 32 bits, or a collection of 32 ones and zeros. So, each IDU in the IDU layer is associated with a WREXIST 32 bit integer. In the WREXISTS 32 bit integer we store water rights information about the Permit, Use, and Municipality. An OWRD Permit type is separated into 5 different categories; unknown, surface, groundwater, reservoir, enlargement, underground An OWRD Use type is separated into 14 different categories; unknown, irrigation, municipal, fish, instream, and mining to name 6 of them. An Municipal OWRD water right relates to the UGB attribute in the IDU layer for the WW2100 study area. (currently not used) In the 1 st 8 bits (from the right) of the 32 bit WREXISTS integer we store OWRD Permit type, in the second 16 bits of the 32 bit WREXISTS interger we store the OWRD Use type, and in the last 8 bits we store Municipal/UGB
7
OWRD Use codes WRU_NULL = 0, WRU_UNKNOWN=1, WRU_MINING=2, WRU_AG=4, WRU_DOMESTIC=8, WRU_IRRIGATION=16, WRU_COMMERCIAL=32, WRU_RECREATION=64, WRU_POWER=128, WRU_FISH=256, WRU_LIVESTOCK=512, WRU_MUNICIPAL=1024, WRU_INSTREAM=2048, WRU_MISC=4096, WRU_WILDLIFE=8192 OWRD Permit codes WRP_UNKNOWN=1, WRP_SURFACE=2, WRP_GROUNDWATER=4, WRP_RESERVOIR=8, WRP_ENLARGEMENT=16, WRP_UNDERGROUND=32 These are the Use and Permit codes that we use in Envision and in the WREXISTS attribute. Notice that the numbers are power of 2s. These numbers will be used to set flags in the 32 bit integer WREXISTS.
8
How WREXIST is created (currently not using Muni 8bits) 1. Create a 32 bit integer and set it equal to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2. Split up 32 bit WREXIST integer into its component parts. Using “bit shifting”. (No flags necessary, currently not used) 0 0 0 0 0 0 0 0 0 0 0 0 3. Set the appropriate flag(s) in the 16 bit Use integer using “bitwise operators” 4. Set the appropriate flag(s) in the 8 bit Permit integer using “bitwise operators” 5. Re-combine Muni, Use, and Permit integers into WREXISTS 32 bit integer using “bitwise operators”
9
Example Description 1.A single IDU in the IDU layer 2.This IDU has a water right that is permitted to divert water from a Surface water source, and it’s beneficial Use is for irrigation. 1. Create a 32 bit integer and set it equal to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2. Split up 32 bit WREXIST integer into its component parts. Using “bit shifting”. (No flags necessary, currently not used) 0 0 0 0 0 0 0 0 0 0 0 0 3. Set the appropriate flag(s) in the 16 bit Use integer using “bitwise operators” 4. Set the appropriate flag(s) in the 8 bit Permit integer using “bitwise operators” 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 set flag at 2 4 = 16 0 0 0 0 0 0 1 0 set flag at 2 1 = 2 5. Re-combine Muni, Use, and Permit integers into WREXISTS 32 bit integer using “bitwise operators” 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 As an interger the value = 4098
10
Example Description 1.A single IDU in the IDU layer 2.This IDU has a water right that is permitted to divert water from a Surface water source and a well, and it’s beneficial Use is for irrigation. 1. Create a 32 bit integer and set it equal to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2. Split up 32 bit WREXIST integer into its component parts. Using “bit shifting”. (No flags necessary, currently not used) 0 0 0 0 0 0 0 0 0 0 0 0 3. Set the appropriate flag(s) in the 16 bit Use integer using “bitwise operators” 4. Set the appropriate flag(s) in the 8 bit Permit integer using “bitwise operators” 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 set flag at 2 4 = 16 0 0 0 0 0 1 1 0 set flag at 2 1 = 2 and set flag at 2 2 = 4 5. Re-combine Muni, Use, and Permit integers into WREXISTS 32 bit integer using “bitwise operators” 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 As an interger the value = 4102
11
Example Description 1.A single IDU in the IDU layer 2.This IDU has a water right that is permitted to divert water from a Surface water source and a well, and it’s beneficial Use is for irrigation and municipal. 1. Create a 32 bit integer and set it equal to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2. Split up 32 bit WREXIST integer into its component parts. Using “bit shifting”. (No flags necessary, currently not used) 0 0 0 0 0 0 0 0 0 0 0 0 3. Set the appropriate flag(s) in the 16 bit Use integer using “bitwise operators” 4. Set the appropriate flag(s) in the 8 bit Permit integer using “bitwise operators” 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 set flag at 2 4 = 16 or set flag at 2 10 = 1024 0 0 0 0 0 1 1 0 set flag at 2 1 = 2 or set flag at 2 2 = 4 5. Re-combine Muni, Use, and Permit integers into WREXISTS 32 bit integer using “bitwise operators” 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 As an interger the value = 266246
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.