datentypen genauigkeiten timo damm. bits and bytes 1 kb = 103 byte = 1000 byte 1 mb = 106 byte =...

17
Datentypen Genauigkeiten Timo Damm

Upload: reino-zerr

Post on 06-Apr-2016

336 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

DatentypenGenauigkeiten

Timo Damm

Page 2: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Bits and Bytes

• 1 kB = 103 Byte = 1000 Byte• 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB)• 1 GB = 109 Byte (CD 0,8GB, DVD 4,7GB)• … TB, PB, EB, ZB, YB

• Bit: Zwei Zustände [0;1]• Nibble: 4 Bit• Byte: 8 Bit und damit 28=1024 Zustände• Word: 16 Bit

Page 3: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Zahlendarstellungen

Quelle: http://de.wikipedia.org/wiki/Oktalsystem

Page 4: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Elementare Datentypen

Quelle: http://de.wikipedia.org/wiki/Datentyp

• Ganze Zahlen (INT, INTEGER, BIGINT, SMALLINT, …)16..64 Bit, bei 32 Bit von (-231..231-1)

• Natürliche Zahlen (BYTE, UNSIGNED, WORD, …)8..64 Bit, bei 32 Bit von (0..232-1)

• Festkommazahlen (DEC, DECIMAL, CURRENCY, …)wird per Stellenzahl gesetzt!

•Zeichen (CHAR, CHARACTER)abhängig vom jeweiligen Zeichensatz!

• Gleitkommazahlen (REAL, SINGLE, DOUBLE, EXTENDED, …)

Page 5: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Integer

Quelle: http://de.wikipedia.org/wiki/Integer_(Datentyp)

Page 6: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Integer

Quelle: http://de.wikipedia.org/wiki/Integer_(Datentyp)

Page 7: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Gleitkommazahl

Quelle: http://de.wikipedia.org/wiki/Gleitkommazahl

f = s m ∙ ∙2e

Page 8: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Gleitkommazahl

Quelle: http://de.wikipedia.org/wiki/Gleitkommazahl

Beispiel 24,7 dezimal nach IEEE 754, binary 32:

24 / 2 = 12 R 012 / 2 = 6 R 06 / 2 = 3 R 03 / 2 = 1 R 11 / 2 = 0 R 1 24dez = 11000 = 1,1000 *24

0,7 * 2 = 1,4 -> 10,4 * 2 = 0,8 -> 00,8 * 2 = 1,6 -> 10,6 * 2 = 1,2 -> 10,2 * 2 = 0,4 -> 0 0,7dez = 0,1 0110 0110 0110 …

24,7dez = 11000,10110011001100110…

Page 9: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Gleitkommazahl

Quelle: http://de.wikipedia.org/wiki/Gleitkommazahl

Éxponent besitzt eine Verschiebung (Bias): +127

127 + 4 = 131dez

131 / 2 = 65 R 165 / 2 = 32 R 132 / 2 = 16 R 016 / 2 = 8 R 08 / 2 = 8 R 04 / 2 = 8 R 02 / 2 = 1 R 01 / 2 = 0 R 1 131dez = 10000011

0 10000011 10001011001100110011001

Page 10: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Dateiformat IGMAS alt8 Vertices (Index,X,Z,Plane)1 -1.00000 -1.10000 12 1.00000 -1.10000 13 -1.00000 -0.10000 14 1.00000 -0.10000 15 -1.00000 -1.10000 26 1.00000 -1.10000 27 -1.00000 -0.10000 28 1.00000 -0.10000 21 Layer boundariesC Layer boundary 1 (Dens. right, dens. left, Number of lines)1 2 25 1 3 4 2 15 5 7 8 6 52 Vertical Planes (Y)-1.00 1.002 Densities1.00 0.00

Page 11: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Dateiformat IGMAS gmdf#gmdf_ascii

unit Quaderdensity 1.0reference_density 0.0

section 1 point 0. -1. point 1. -1. coordinates 1 -1.00000 -1.10000 2 1.00000 -1.10000 3 -1.00000 -0.10000 4 1.00000 -0.10000

unit Quader Vertices1 3 4 2

section 2 point 0. 1. point 1. 1. coordinates 1 -1.00000 -1.10000 2 1.00000 -1.10000 3 -1.00000 -0.10000 4 1.00000 -0.10000

unit Quadervertices 1 3 4 2

Page 12: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Dateiformat IGMAS XML<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE geodata SYSTEM "geodata.dtd"> <!-- Created by IGMAS --><geodata name="Synthetic Saltdome"> <projection name="unknown" units="km" /> <magnetic_field total_field="49441." units="nT" inclination=" 69." declination=" 1." /> <property name="Body" value="Permian"> <property name="Density" units="g/cm^3" value="-0.100" /> <property name="Susceptibility" units="SI" value="0.000000" /> <property name="Koenigsberg ratio" units="SI" value="0.000" /> <color red="0.25" green="1.00" blue="0.12" /> </property> <property name="Body" value="Triassic"> … </property>…

Page 13: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Dateiformat IGMAS XML… <geometry> <cross_section x_start="0." y_start="-500." x_end="100." y_end="-500." name="First_section" /> <vertex id="1" x="-500." z="0." /> <vertex id="2" x="500." z="0." /> <vertex id="3" x="-500." z="-1.352" /> <vertex id="4" x="2.08999991" z="-1.20299995" /> <vertex id="5" x="4.02400017" z="-1.02499998" /> <vertex id="6" x="5.76200008" z="-0.907000005" /> <vertex id="7" x="7.67600012" z="-0.787999988" /> <vertex id="8" x="9.92199993" z="-0.759000003" /> <vertex id="9" x="12.1289997" z="-0.787999988" /> <vertex id="10" x="14.6490002" z="-0.995999992" /> <vertex id="11" x="17.1100006" z="-1.14400005" /> <vertex id="12" x="500." z="-1.41100001" /> <vertex id="13" x="-500." z="-2.50900006" />..

Page 14: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Dateiformat IGMAS XML… <entry type="triangle_set" id_list=" 56 113 114 56 55 113 55 112 113 55 54 112 54 111 112 54 53 111 53 110 111 53 52 110 52 109 110 52 51 109 51 50 109 50 108 109 50 107 108 50 49 107 49 106 107 49 48 106 48 105 106 48 47 105 47 46 105 46 104 105 114 113 172 113 171 172 113 112 171 112 170 171 112 169 170 112 111 169 111 168 169 111 110 168 110 109 168 109 167 168 109 166 167 109 108 166 108 107 166 107 165 166 107 189 165 107 106 189 106 164 189 106 105 164 105 163 164 105 162 163 105 104 162 172 221 222 172 171 221 171 220 221 171 170 220 170 219 220 170 169 219 169 168 219 168 218 219 168 167 218 167 217 218 167 166 217 166 286 217 166 216 286 166 165 216 165 215 216 165 189 215 189 214 215 189 164 214 164 213 214 164 163 213 163 212 213 163 162 212 162 211 212 222 221 348 221 347 348 221 220 347 … </entry> </geometry></geodata>

Page 15: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Dateiformat IGMAS DTD<?xml version="1.0" encoding="UTF-8"?><!-- edited with XML Spy v2.5 NT - http://www.xmlspy.com --><!-- Entwurf einer Struktur fuer Geodaten - S. Schmidt, CAU Kiel. Last mod. 10-2006 --><!-- Es fehlen noch Tetraeder, sonst sollte es vollstaendig sein. --><!ELEMENT geodata ((geographic|projection), magnetic_field?, property*, (geometry|grid|bitmap)*)><!ELEMENT geometry (cross_section?, vertex*, entry*)><!ELEMENT vertex (property)*><!ELEMENT entry (property*, vertex*)><!ELEMENT geographic EMPTY><!ELEMENT projection EMPTY><!ELEMENT magnetic_field EMPTY><!ELEMENT color EMPTY><!ELEMENT cross_section EMPTY><!ELEMENT grid (property)*><!ELEMENT bitmap EMPTY><!ELEMENT property ((property)*, color?)>

Page 16: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Dateiformat IGMAS DTD…<!ATTLIST vertex id CDATA #IMPLIED

x CDATA #REQUIREDy CDATA "0"z CDATA "0"modify (true | false) "true">

<!ATTLIST entry type (point_set | line | polygon | triangle_set) #REQUIREDscale CDATA "unknown"id_list CDATA #IMPLIED>

<!ATTLIST cross_section x_start CDATA #REQUIREDy_start CDATA #REQUIREDx_end CDATA #REQUIREDy_end CDATA #REQUIREDoffset CDATA #IMPLIEDname CDATA #IMPLIED>

<!ATTLIST grid order_123 (xyz|yxz|zxy|zyx|xzy|yzx) "xyz"…

Page 17: Datentypen Genauigkeiten Timo Damm. Bits and Bytes 1 kB = 103 Byte = 1000 Byte 1 MB = 106 Byte = 1000000 Byte (Diskette 1,44 MB) 1 GB = 109 Byte (CD 0,8GB,

Dateiformat IGMAS DTD