Wikibooks
ltwikibooks
https://lt.wikibooks.org/wiki/Pagrindinis_puslapis
MediaWiki 1.47.0-wmf.18
first-letter
Medija
Specialus
Aptarimas
Naudotojas
Naudotojo aptarimas
Wikibooks
Wikibooks aptarimas
Vaizdas
Vaizdo aptarimas
MediaWiki
MediaWiki aptarimas
Šablonas
Šablono aptarimas
Pagalba
Pagalbos aptarimas
Kategorija
Kategorijos aptarimas
TimedText
TimedText talk
Module
Module talk
Event
Event talk
Wikibooks:Knygos/High Level Shading Language
4
4927
58936
58781
2026-09-02T11:31:36Z
Paraboloid
1294
/* High Level Shading Language */
58936
wikitext
text/x-wiki
{{išsaugota_knyga}}
== High Level Shading Language ==
=== HLSL ===
:[[Matematika/Vektorius|Vektorius]]
:[[Šviesos atspindėjimas]]
:[[Šviesos laužimas]]
:[[Šviesos laužimas ir atspindėjimas]]
:[[Šviesos laužimas per pixelį]]
:[[Šviesos laužimas ir atspindėjimas per pixelį]]
:[[Renderinimo principai]]
:[[GPU galimybės]]
:[[Spekuliacijos]]
:[[Free Pascal benchmark'ai]]
:[[Spekuliacijos apie intel 8008]]
:[[Dešimtainių skaičių vertimas į dvejetainius skaičius]]
[[Kategorija:Knygos|High Level Shading Language]]
4apg0fq2fb9fbjxtijgp2gpkbfnqw8g
Dešimtainių skaičių vertimas į dvejetainius skaičius
0
11878
58937
2026-09-02T11:49:19Z
Paraboloid
1294
Naujas puslapis: ==Dešimtainių skaičių vertimas į dvejetainius skaičius== [https://www.google.com/search?client=opera&q=single+precision&sourceid=opera&ie=UTF-8&oe=UTF-8&udm=50&fbs=ABfTbFVyMZGZf1hfvX9uKjN_-G8c4u0nXx4bEIpwm1lnNH832VTJOOCxW_fyN-Q_ezyf8gKjm3rhh_G8jdZ2Q6tji4z8Mva6cfvBj5rpPch2IC955IbzrbwHf6tkbFbd-nuFdbKth9Y-58t5LtnYgTA4TWDFYCUNl4d7F9XBAwiEq2T2c7SNgrvMxYiRBXL4fnQnnTOewx28&aep=10&ntc=1&sxsrf=APpeQnvZo3fX2PwO881uSdWsoRELP18NhQ%3A1788348274309&mstk=AUtExfAJ0Kp9BqT3EJbzHOz3MH...
58937
wikitext
text/x-wiki
==Dešimtainių skaičių vertimas į dvejetainius skaičius==
[https://www.google.com/search?client=opera&q=single+precision&sourceid=opera&ie=UTF-8&oe=UTF-8&udm=50&fbs=ABfTbFVyMZGZf1hfvX9uKjN_-G8c4u0nXx4bEIpwm1lnNH832VTJOOCxW_fyN-Q_ezyf8gKjm3rhh_G8jdZ2Q6tji4z8Mva6cfvBj5rpPch2IC955IbzrbwHf6tkbFbd-nuFdbKth9Y-58t5LtnYgTA4TWDFYCUNl4d7F9XBAwiEq2T2c7SNgrvMxYiRBXL4fnQnnTOewx28&aep=10&ntc=1&sxsrf=APpeQnvZo3fX2PwO881uSdWsoRELP18NhQ%3A1788348274309&mstk=AUtExfAJ0Kp9BqT3EJbzHOz3MHMalnyXkoOTLvgho5ZQ9lzjrnmmUFCgux_RVe7bouRlyBSGpkUcLpvfZ39N45TUoor6TyyEW7_PpE7eOwP-kU7IFxE6monk-HtsDXkDu7g362AN4NTW3oRjfwn9OtD0BIj2r4QAVauMhDPCIAiWgLimDuate6cf2o6bB5R-6-vzcCqbCju1KJQTdR4HSF9puZ_HCG1hXQ8QaCIqD1LJ_HWonNnZGma6Biu3I1wWFPy6esLnfaKpIX6VFWZsArfQN97XGipwkH7FLKCyZiev5rZBrhE8KincMthP7B9AJDugKLy8qJfORQ7PQR2GslAaCLnkechjBCnXfrmSohwJskbEWU9db6Q279uO4dGu0eI2YUvpEwoQUqkbREqJqrGpJQWFy7WoTzI93_o_2I61PU1FTiuGq-4AVN7erT0WmuWizHDEE2XsTes&aioh=3&csuir=1&atvm=2&mtid=dQeYaumuDL2Ixc8Px6Ts0QE DI atsakymas]
:Single-precision is a 32-bit computer number format that stores fractional and large numbers using a sign bit, an exponent, and a mantissa. Structure of Single-Precision (Binary32) According to Wikipedia, “Single-precision floating-point format (sometimes called FP32, float32, or float) is a computer number format, usually occupying 32 bits in computer memory.” The 32 bits are divided into three specific parts:
*Sign bit (1 bit): Determines if the number is positive (0) or negative (1).
*Biased exponent (8 bits): Stores the magnitude with an excess-127 bias, giving an actual exponent range of -126 to +127.
*Mantissa/Significand (23 explicitly stored bits): Represents the precision digits of the number, with an implicit leading 1 for normalized values.
:Precision and Applications. Decimal Precision: Provides about 7 to 8 decimal digits of accuracy. Most users on StackOverflow agree that “Single precision typically offers 7-8 decimal digits of precision.”
:'''Dešimtainių skaičių vertimas į dvejetainius.'''
:Step-by-Step Conversion Framework.
*Step 1: Determine the Sign Bit (1 bit). If the number is positive, the sign bit is 0. If the number is negative, the sign bit is 1. Example (-12.625): It is negative, so the sign bit is 1.
*Step 2: Convert the Absolute Value to Binary. Separate the number into its integer and fractional parts, convert both to binary, and combine them. Integer part '''12''': (12/2 = 6) ('''rem'''ainder 0), (6/2 = 3) (rem 0), (3/2 = 1) (rem 1), (1/2 = 0) (rem 1) <math>\rightarrow </math> '''1100'''.
:Fractional part '''0.625''': (0.625 * 2 = 1.25) (1), (0.25 * 2 = 0.5) (0), (0.5 \times 2 = 1.0) (1) <math>\rightarrow </math> '''101'''.
:Example Combined: '''12.625''' = '''1100.101'''
*Step 3: Normalize the Binary Number. Shift the binary point so that exactly one non-zero digit (which will always be 1) remains to its left. Count how many places you moved the point. This count is your exponent (E).
:Move the point 3 places to the left: '''1100.101''' <math>\rightarrow </math> '''1.100101'''.
:Example Exponent: Because we moved it 3 places, E = 3.
*Step 4: Calculate the Biased Exponent (8 bits) IEEE 754 single-precision uses a bias of 127. Add your exponent E to this bias, and convert the resulting integer to an 8-bit binary number.
:Calculation: 127 + 3 = 130.
:Convert 130 to 8-bit binary: '''130''' = '''10000010'''.
*Step 5: Extract the Mantissa/Significand (23 bits).
:Take the fractional bits from your normalized number (everything to the right of the binary point). Drop the leading 1. If the bits are fewer than 23, pad the right side with zeros until you reach exactly 23 bits.
:Normalized bits: 1.100101 <math>\rightarrow </math> Drop the ''1.'' (atmesti kairiausią vienetą ir tašką po jo) to get '''100101''.
:Example Pad to 23 bits: 10010100000000000000000.
m886vbjljnbabo7jdhznq9wfa3gu180
58938
58937
2026-09-02T11:54:31Z
Paraboloid
1294
/* Dešimtainių skaičių vertimas į dvejetainius skaičius */
58938
wikitext
text/x-wiki
==Dešimtainių skaičių vertimas į dvejetainius skaičius==
[https://www.google.com/search?client=opera&q=single+precision&sourceid=opera&ie=UTF-8&oe=UTF-8&udm=50&fbs=ABfTbFVyMZGZf1hfvX9uKjN_-G8c4u0nXx4bEIpwm1lnNH832VTJOOCxW_fyN-Q_ezyf8gKjm3rhh_G8jdZ2Q6tji4z8Mva6cfvBj5rpPch2IC955IbzrbwHf6tkbFbd-nuFdbKth9Y-58t5LtnYgTA4TWDFYCUNl4d7F9XBAwiEq2T2c7SNgrvMxYiRBXL4fnQnnTOewx28&aep=10&ntc=1&sxsrf=APpeQnvZo3fX2PwO881uSdWsoRELP18NhQ%3A1788348274309&mstk=AUtExfAJ0Kp9BqT3EJbzHOz3MHMalnyXkoOTLvgho5ZQ9lzjrnmmUFCgux_RVe7bouRlyBSGpkUcLpvfZ39N45TUoor6TyyEW7_PpE7eOwP-kU7IFxE6monk-HtsDXkDu7g362AN4NTW3oRjfwn9OtD0BIj2r4QAVauMhDPCIAiWgLimDuate6cf2o6bB5R-6-vzcCqbCju1KJQTdR4HSF9puZ_HCG1hXQ8QaCIqD1LJ_HWonNnZGma6Biu3I1wWFPy6esLnfaKpIX6VFWZsArfQN97XGipwkH7FLKCyZiev5rZBrhE8KincMthP7B9AJDugKLy8qJfORQ7PQR2GslAaCLnkechjBCnXfrmSohwJskbEWU9db6Q279uO4dGu0eI2YUvpEwoQUqkbREqJqrGpJQWFy7WoTzI93_o_2I61PU1FTiuGq-4AVN7erT0WmuWizHDEE2XsTes&aioh=3&csuir=1&atvm=2&mtid=dQeYaumuDL2Ixc8Px6Ts0QE DI atsakymas]
:Single-precision is a 32-bit computer number format that stores fractional and large numbers using a sign bit, an exponent, and a mantissa. Structure of Single-Precision (Binary32) According to Wikipedia, “Single-precision floating-point format (sometimes called FP32, float32, or float) is a computer number format, usually occupying 32 bits in computer memory.” The 32 bits are divided into three specific parts:
*Sign bit (1 bit): Determines if the number is positive (0) or negative (1).
*Biased exponent (8 bits): Stores the magnitude with an excess-127 bias, giving an actual exponent range of -126 to +127.
*Mantissa/Significand (23 explicitly stored bits): Represents the precision digits of the number, with an implicit leading 1 for normalized values.
:Precision and Applications. Decimal Precision: Provides about 7 to 8 decimal digits of accuracy. Most users on StackOverflow agree that “Single precision typically offers 7-8 decimal digits of precision.”
:'''Dešimtainių skaičių vertimas į dvejetainius.'''
:Step-by-Step Conversion Framework.
*Step 1: Determine the Sign Bit (1 bit). If the number is positive, the sign bit is 0. If the number is negative, the sign bit is 1. Example (-12.625): It is negative, so the sign bit is 1.
*Step 2: Convert the Absolute Value to Binary. Separate the number into its integer and fractional parts, convert both to binary, and combine them. Integer part '''12''': (12/2 = 6) ('''rem'''ainder 0), (6/2 = 3) (rem 0), (3/2 = 1) (rem 1), (1/2 = 0) (rem 1) <math>\rightarrow </math> '''1100'''.
:Fractional part '''0.625''': (0.625 * 2 = 1.25) (1), (0.25 * 2 = 0.5) (0), (0.5 \times 2 = 1.0) (1) <math>\rightarrow </math> '''101'''.
:Example Combined: '''12.625''' = '''1100.101'''
*Step 3: Normalize the Binary Number. Shift the binary point so that exactly one non-zero digit (which will always be 1) remains to its left. Count how many places you moved the point. This count is your exponent (E).
:Move the point 3 places to the left: '''1100.101''' <math>\rightarrow </math> '''1.100101'''.
:Example Exponent: Because we moved it 3 places, E = 3.
*Step 4: Calculate the Biased Exponent (8 bits) IEEE 754 single-precision uses a bias of 127. Add your exponent E to this bias, and convert the resulting integer to an 8-bit binary number.
:Calculation: 127 + 3 = 130.
:Convert 130 to 8-bit binary: '''130''' = '''10000010'''.
*Step 5: Extract the Mantissa/Significand (23 bits).
:Take the fractional bits from your normalized number (everything to the right of the binary point). Drop the leading 1. If the bits are fewer than 23, pad the right side with zeros until you reach exactly 23 bits.
:Normalized bits: 1.100101 <math>\rightarrow </math> Drop the ''1.'' (atmesti kairiausią vienetą ir tašką po jo) to get '''100101'''.
:Example Pad to 23 bits: 10010100000000000000000.
:'''Final Assembly.'''
:Combine the three components in order: Sign (1 bit) + Exponent (8 bits) + Mantissa (23 bits).
:Component_____________Bits______________Value for '''-12.625'''
:Sign____________________1_________________________1______________
:Exponent________________8______________________10000010
:Mantissa______________23________________10001010000000000000000
*Final 32-bit Binary String: '''11000001010001010000000000000000'''.
*Hexadecimal Representation: '''C1450000'''.
sbn7elh6cqy2t6fsx4t7blp4yaupnrn
58939
58938
2026-09-02T11:55:14Z
Paraboloid
1294
/* Dešimtainių skaičių vertimas į dvejetainius skaičius */
58939
wikitext
text/x-wiki
==Dešimtainių skaičių vertimas į dvejetainius skaičius==
[https://www.google.com/search?client=opera&q=single+precision&sourceid=opera&ie=UTF-8&oe=UTF-8&udm=50&fbs=ABfTbFVyMZGZf1hfvX9uKjN_-G8c4u0nXx4bEIpwm1lnNH832VTJOOCxW_fyN-Q_ezyf8gKjm3rhh_G8jdZ2Q6tji4z8Mva6cfvBj5rpPch2IC955IbzrbwHf6tkbFbd-nuFdbKth9Y-58t5LtnYgTA4TWDFYCUNl4d7F9XBAwiEq2T2c7SNgrvMxYiRBXL4fnQnnTOewx28&aep=10&ntc=1&sxsrf=APpeQnvZo3fX2PwO881uSdWsoRELP18NhQ%3A1788348274309&mstk=AUtExfAJ0Kp9BqT3EJbzHOz3MHMalnyXkoOTLvgho5ZQ9lzjrnmmUFCgux_RVe7bouRlyBSGpkUcLpvfZ39N45TUoor6TyyEW7_PpE7eOwP-kU7IFxE6monk-HtsDXkDu7g362AN4NTW3oRjfwn9OtD0BIj2r4QAVauMhDPCIAiWgLimDuate6cf2o6bB5R-6-vzcCqbCju1KJQTdR4HSF9puZ_HCG1hXQ8QaCIqD1LJ_HWonNnZGma6Biu3I1wWFPy6esLnfaKpIX6VFWZsArfQN97XGipwkH7FLKCyZiev5rZBrhE8KincMthP7B9AJDugKLy8qJfORQ7PQR2GslAaCLnkechjBCnXfrmSohwJskbEWU9db6Q279uO4dGu0eI2YUvpEwoQUqkbREqJqrGpJQWFy7WoTzI93_o_2I61PU1FTiuGq-4AVN7erT0WmuWizHDEE2XsTes&aioh=3&csuir=1&atvm=2&mtid=dQeYaumuDL2Ixc8Px6Ts0QE DI atsakymas]
:Single-precision is a 32-bit computer number format that stores fractional and large numbers using a sign bit, an exponent, and a mantissa. Structure of Single-Precision (Binary32) According to Wikipedia, “Single-precision floating-point format (sometimes called FP32, float32, or float) is a computer number format, usually occupying 32 bits in computer memory.” The 32 bits are divided into three specific parts:
*Sign bit (1 bit): Determines if the number is positive (0) or negative (1).
*Biased exponent (8 bits): Stores the magnitude with an excess-127 bias, giving an actual exponent range of -126 to +127.
*Mantissa/Significand (23 explicitly stored bits): Represents the precision digits of the number, with an implicit leading 1 for normalized values.
:Precision and Applications. Decimal Precision: Provides about 7 to 8 decimal digits of accuracy. Most users on StackOverflow agree that “Single precision typically offers 7-8 decimal digits of precision.”
:'''Dešimtainių skaičių vertimas į dvejetainius.'''
:Step-by-Step Conversion Framework.
*Step 1: Determine the Sign Bit (1 bit). If the number is positive, the sign bit is 0. If the number is negative, the sign bit is 1. Example (-12.625): It is negative, so the sign bit is 1.
*Step 2: Convert the Absolute Value to Binary. Separate the number into its integer and fractional parts, convert both to binary, and combine them. Integer part '''12''': (12/2 = 6) ('''rem'''ainder 0), (6/2 = 3) (rem 0), (3/2 = 1) (rem 1), (1/2 = 0) (rem 1) <math>\rightarrow </math> '''1100'''.
:Fractional part '''0.625''': (0.625 * 2 = 1.25) (1), (0.25 * 2 = 0.5) (0), (0.5 \times 2 = 1.0) (1) <math>\rightarrow </math> '''101'''.
:Example Combined: '''12.625''' = '''1100.101'''
*Step 3: Normalize the Binary Number. Shift the binary point so that exactly one non-zero digit (which will always be 1) remains to its left. Count how many places you moved the point. This count is your exponent (E).
:Move the point 3 places to the left: '''1100.101''' <math>\rightarrow </math> '''1.100101'''.
:Example Exponent: Because we moved it 3 places, E = 3.
*Step 4: Calculate the Biased Exponent (8 bits) IEEE 754 single-precision uses a bias of 127. Add your exponent E to this bias, and convert the resulting integer to an 8-bit binary number.
:Calculation: 127 + 3 = 130.
:Convert 130 to 8-bit binary: '''130''' = '''10000010'''.
*Step 5: Extract the Mantissa/Significand (23 bits).
:Take the fractional bits from your normalized number (everything to the right of the binary point). Drop the leading 1. If the bits are fewer than 23, pad the right side with zeros until you reach exactly 23 bits.
:Normalized bits: 1.100101 <math>\rightarrow </math> Drop the ''1.'' (atmesti kairiausią vienetą ir tašką po jo) to get '''100101'''.
:Example Pad to 23 bits: 10010100000000000000000.
:'''Final Assembly.'''
:Combine the three components in order: Sign (1 bit) + Exponent (8 bits) + Mantissa (23 bits).
:Component_____________Bits______________Value for -12.625
:Sign____________________1_________________________1______________
:Exponent________________8______________________10000010
:Mantissa________________23________________10001010000000000000000
*Final 32-bit Binary String: '''11000001010001010000000000000000'''.
*Hexadecimal Representation: '''C1450000'''.
j1i7zj9bhtkjmtitqd3g8pxse8ewjr9
58940
58939
2026-09-02T11:58:13Z
Paraboloid
1294
/* Dešimtainių skaičių vertimas į dvejetainius skaičius */
58940
wikitext
text/x-wiki
==Dešimtainių skaičių vertimas į dvejetainius skaičius==
[https://www.google.com/search?client=opera&q=single+precision&sourceid=opera&ie=UTF-8&oe=UTF-8&udm=50&fbs=ABfTbFVyMZGZf1hfvX9uKjN_-G8c4u0nXx4bEIpwm1lnNH832VTJOOCxW_fyN-Q_ezyf8gKjm3rhh_G8jdZ2Q6tji4z8Mva6cfvBj5rpPch2IC955IbzrbwHf6tkbFbd-nuFdbKth9Y-58t5LtnYgTA4TWDFYCUNl4d7F9XBAwiEq2T2c7SNgrvMxYiRBXL4fnQnnTOewx28&aep=10&ntc=1&sxsrf=APpeQnvZo3fX2PwO881uSdWsoRELP18NhQ%3A1788348274309&mstk=AUtExfAJ0Kp9BqT3EJbzHOz3MHMalnyXkoOTLvgho5ZQ9lzjrnmmUFCgux_RVe7bouRlyBSGpkUcLpvfZ39N45TUoor6TyyEW7_PpE7eOwP-kU7IFxE6monk-HtsDXkDu7g362AN4NTW3oRjfwn9OtD0BIj2r4QAVauMhDPCIAiWgLimDuate6cf2o6bB5R-6-vzcCqbCju1KJQTdR4HSF9puZ_HCG1hXQ8QaCIqD1LJ_HWonNnZGma6Biu3I1wWFPy6esLnfaKpIX6VFWZsArfQN97XGipwkH7FLKCyZiev5rZBrhE8KincMthP7B9AJDugKLy8qJfORQ7PQR2GslAaCLnkechjBCnXfrmSohwJskbEWU9db6Q279uO4dGu0eI2YUvpEwoQUqkbREqJqrGpJQWFy7WoTzI93_o_2I61PU1FTiuGq-4AVN7erT0WmuWizHDEE2XsTes&aioh=3&csuir=1&atvm=2&mtid=dQeYaumuDL2Ixc8Px6Ts0QE DI atsakymas]
:Single-precision is a 32-bit computer number format that stores fractional and large numbers using a sign bit, an exponent, and a mantissa. Structure of Single-Precision (Binary32) According to Wikipedia, “Single-precision floating-point format (sometimes called FP32, float32, or float) is a computer number format, usually occupying 32 bits in computer memory.” The 32 bits are divided into three specific parts:
*Sign bit (1 bit): Determines if the number is positive (0) or negative (1).
*Biased exponent (8 bits): Stores the magnitude with an excess-127 bias, giving an actual exponent range of -126 to +127.
*Mantissa/Significand (23 explicitly stored bits): Represents the precision digits of the number, with an implicit leading 1 for normalized values.
:Precision and Applications. Decimal Precision: Provides about 7 to 8 decimal digits of accuracy. Most users on StackOverflow agree that “Single precision typically offers 7-8 decimal digits of precision.”
:'''Dešimtainių skaičių vertimas į dvejetainius.'''
:Step-by-Step Conversion Framework.
*Step 1: Determine the Sign Bit (1 bit). If the number is positive, the sign bit is 0. If the number is negative, the sign bit is 1. Example (-12.625): It is negative, so the sign bit is 1.
*Step 2: Convert the Absolute Value to Binary. Separate the number into its integer and fractional parts, convert both to binary, and combine them. Integer part '''12''': (12/2 = 6) ('''rem'''ainder 0), (6/2 = 3) (rem 0), (3/2 = 1) (rem 1), (1/2 = 0) (rem 1) <math>\rightarrow </math> '''1100'''.
:Fractional part '''0.625''': (0.625 * 2 = 1.25) (1), (0.25 * 2 = 0.5) (0), (0.5 \times 2 = 1.0) (1) <math>\rightarrow </math> '''101'''.
:Example Combined: '''12.625''' = '''1100.101'''
*Step 3: Normalize the Binary Number. Shift the binary point so that exactly one non-zero digit (which will always be 1) remains to its left. Count how many places you moved the point. This count is your exponent (E).
:Move the point 3 places to the left: '''1100.101''' <math>\rightarrow </math> '''1.100101'''.
:Example Exponent: Because we moved it 3 places, E = 3.
*Step 4: Calculate the Biased Exponent (8 bits) IEEE 754 single-precision uses a bias of 127. Add your exponent E to this bias, and convert the resulting integer to an 8-bit binary number.
:Calculation: 127 + 3 = 130.
:Convert 130 to 8-bit binary: '''130''' = '''10000010'''.
*Step 5: Extract the Mantissa/Significand (23 bits).
:Take the fractional bits from your normalized number (everything to the right of the binary point). Drop the leading 1. If the bits are fewer than 23, pad the right side with zeros until you reach exactly 23 bits.
:Normalized bits: 1.100101 <math>\rightarrow </math> Drop the ''1.'' (atmesti kairiausią vienetą ir tašką po jo) to get '''100101'''.
:Example Pad to 23 bits: 10010100000000000000000.
:'''Final Assembly.'''
:Combine the three components in order: Sign (1 bit) + Exponent (8 bits) + Mantissa (23 bits).
:Component_____________Bits______________Value for -12.625
:Sign____________________1_________________________1______________
:Exponent________________8______________________10000010
:Mantissa________________23________________10001010000000000000000
*Final 32-bit Binary String: '''11000001010001010000000000000000'''.
*Hexadecimal Representation: '''C1450000'''.
:Sign: '''1'''1000001010001010000000000000000.
:Exponent: 1'''10000010'''10001010000000000000000.
:Mantissa: 110000010'''10001010000000000000000'''.
71nexksioz5m9wyhw6571fe15n8rt4d