Logical shift (original) (raw)

About DBpedia

컴퓨팅에서 논리 시프트는 피연산자의 모든 비트를 이동하는 이다. 산술 시프트와 다르게, 논리 시프트는 수의 부호비트를 보존하지 않거나 가수로부터 수의 지수를 식별하지 않는다; 피연산자의 모든비트는 주어진 수의 비트위치로 단순히 이동하고, 비어있는 비트위치는 (와 비교해서) 일반적으로 0으로 채워진다. 논리 시프트는 피연산자가 숫자보다 비트의 수열로 처리될때도 사용된다.

thumbnail

Property Value
dbo:abstract Unter einer logischen Verschiebung (engl. logical shift) versteht man in der Informatik einen bitweisen Operator, der alle Bits des Operanden verschiebt. Die logische im Gegensatz zur arithmetischen Verschiebung erhält weder das Vorzeichenbit noch unterscheidet sie zwischen dem Exponenten und der Mantisse einer Zahl. Jedes Bit des Operanden wird einfach um eine gegebene Positionsanzahl verschoben und die entstehenden Bit-Positionen werden, in der Regel mit Nullen, aufgefüllt. Eine logische Verschiebung wird oft genutzt, wenn der Operand als Sequenz von Bits und nicht als Zahl betrachtet wird. Logische Verschiebungen können ein sinnvoller und effizienter Weg sein, Multiplikationen oder Divisionen von vorzeichenlosen Integer-Zahlen (Ganzzahlen) zur zweiten Potenz durchzuführen. Eine Verschiebung nach links um n Bits bei einer vorzeichenlosen oder vorzeichenbehafteten binären Zahl hat den Effekt einer Multiplikation mit 2n. Verschieben nach rechts um n Bits bei einer vorzeichenlosen binären Zahl ist gleichbedeutend mit dem Dividieren durch 2n (und anschließendem Abrunden). Weil sich arithmetische Verschiebungen und logische Verschiebungen nach rechts unterscheiden, haben viele Programmiersprachen verschiedene Operatoren für sie. So ist der arithmetische Shift-Operator bei Java und JavaScript zum Beispiel >>; wohingegen der logische Rechtsshift >>> ist. Java allein hat nur einen Linksshift-Operator (<<), weil arithmetische und logische Verschiebung denselben Effekt haben. Die Sprache C wieder kennt nur einen Rechtsshift-Operator >>. Viele C-Compiler entscheiden die Art der Rechtsverschiebung danach, welcher Integer-Datentyp verschoben werden soll; oft werden vorzeichenbehaftete Ganzzahlen arithmetisch verschoben und vorzeichenlose logisch. (de) In computer science, a logical shift is a bitwise operation that shifts all the bits of its operand. The two base variants are the logical left shift and the logical right shift. This is further modulated by the number of bit positions a given value shall be shifted, such as shift left by 1 or shift right by n. Unlike an arithmetic shift, a logical shift does not preserve a number's sign bit or distinguish a number's exponent from its significand (mantissa); every bit in the operand is simply moved a given number of bit positions, and the vacant bit-positions are filled, usually with zeros, and possibly ones (contrast with a circular shift). A logical shift is often used when its operand is being treated as a sequence of bits instead of as a number. Logical shifts can be useful as efficient ways to perform multiplication or division of unsigned integers by powers of two. Shifting left by n bits on a signed or unsigned binary number has the effect of multiplying it by 2n. Shifting right by n bits on an unsigned binary number has the effect of dividing it by 2n (rounding towards 0). Logical right shift differs from arithmetic right shift. Thus, many languages have different operators for them. For example, in Java and JavaScript, the logical right shift operator is >>>, but the arithmetic right shift operator is >>. (Java has only one left shift operator (<<), because left shift via logic and arithmetic have the same effect.) The programming languages C, C++, and Go, however, have only one right shift operator, >>. Most C and C++ implementations, and Go, choose which right shift to perform depending on the type of integer being shifted: signed integers are shifted using the arithmetic shift, and unsigned integers are shifted using the logical shift. All currently relevant C standards (ISO/IEC 9899:1999 to 2011) leave a definition gap for cases where the number of shifts is equal to or bigger than the number of bits in the operands in a way that the result is undefined. This helps allow C compilers to emit efficient code for various platforms by allowing direct use of the native shift instructions which have differing behavior. For example, shift-left-word in PowerPC chooses the more-intuitive behavior where shifting by the bit width or above gives zero, whereas SHL in x86 chooses to mask the shift amount to the lower bits to reduce the maximum execution time of the instructions, and as such a shift by the bit width doesn't change the value. Some languages, such as the .NET Framework and LLVM, also leave shifting by the bit width and above unspecified (.NET) or undefined (LLVM). Others choose to specify the behavior of their most common target platforms, such as C# which specifies the x86 behavior. (en) 컴퓨팅에서 논리 시프트는 피연산자의 모든 비트를 이동하는 이다. 산술 시프트와 다르게, 논리 시프트는 수의 부호비트를 보존하지 않거나 가수로부터 수의 지수를 식별하지 않는다; 피연산자의 모든비트는 주어진 수의 비트위치로 단순히 이동하고, 비어있는 비트위치는 (와 비교해서) 일반적으로 0으로 채워진다. 논리 시프트는 피연산자가 숫자보다 비트의 수열로 처리될때도 사용된다. (ko) Przesunięcie bitowe – operacja na liczbach w systemie dwójkowym polegająca na przesunięciu wszystkich cyfr binarnych o pozycji w lewo lub prawo. Jest to działanie powszechnie stosowane w elektronice i informatyce. Najczęściej przesunięcie wykorzystuje się do szybkiego mnożenia/dzielenia przez liczbę 2 i jej potęgi oraz do sekwencyjnego testowania wartości poszczególnych bitów. W cyfrowych układach elektronicznych przesunięcie bitowe realizowane jest przez rejestry przesuwające. W różnych językach programowania istnieją funkcje bądź operatory, realizujące przesunięcie: * w C/C++, PHP, Javie, Pythonie – >> (przesunięcie w prawo), << (przesunięcie w lewo); * w Pascalu – shr (przesunięcie w prawo), shl (przesunięcie w lewo). (pl)
dbo:thumbnail wiki-commons:Special:FilePath/Rotate_left_logically.svg?width=300
dbo:wikiPageID 1893663 (xsd:integer)
dbo:wikiPageInterLanguageLink dbpedia-zh:位操作
dbo:wikiPageLength 6928 (xsd:nonNegativeInteger)
dbo:wikiPageRevisionID 1121632710 (xsd:integer)
dbo:wikiPageWikiLink dbr:PowerPC dbr:PowerShell dbr:Python_(programming_language) dbr:Batch_file dbr:Bitwise_operation dbr:Delphi_(programming_language) dbr:Julia_(programming_language) dbr:VHDL dbr:Verilog dbr:.NET_Framework dbr:Rust_(programming_language) dbr:Go_(programming_language) dbr:Arithmetic_shift dbr:MIPS_architecture dbr:Standard_ML dbr:Computer_science dbr:C++ dbr:C_(programming_language) dbr:C_Sharp_(programming_language) dbr:X86_assembly_language dbr:Ada_(programming_language) dbr:D_(programming_language) dbc:Operators_(programming) dbr:F_Sharp_(programming_language) dbr:Fortran dbr:PHP dbc:Binary_arithmetic dbr:JavaScript dbr:Java_(programming_language) dbr:LLVM dbr:Swift_(programming_language) dbr:Circular_shift dbr:Integer dbr:Kotlin_(programming_language) dbr:OCaml dbr:Object_Pascal dbr:Operator_(programming) dbr:Sequence dbr:X86 dbr:Programming_language dbr:Significand dbr:Exponent dbr:File:Rotate_left_logically.svg dbr:File:Rotate_right_logically.svg
dbp:wikiPageUsesTemplate dbt:Cleanup_bare_URLs dbt:Clear dbt:Mono dbt:More_citations_needed dbt:Redirect dbt:Reflist dbt:Short_description
dct:subject dbc:Operators_(programming) dbc:Binary_arithmetic
gold:hypernym dbr:Operation
rdf:type yago:Abstraction100002137 yago:Arrangement105726596 yago:Cognition100023271 yago:Concept105835747 yago:Content105809192 yago:DataStructure105728493 yago:Idea105833840 yago:PsychologicalFeature100023100 dbo:MilitaryConflict yago:Structure105726345 yago:WikicatDataStructures yago:WikicatProgrammingConstructs
rdfs:comment 컴퓨팅에서 논리 시프트는 피연산자의 모든 비트를 이동하는 이다. 산술 시프트와 다르게, 논리 시프트는 수의 부호비트를 보존하지 않거나 가수로부터 수의 지수를 식별하지 않는다; 피연산자의 모든비트는 주어진 수의 비트위치로 단순히 이동하고, 비어있는 비트위치는 (와 비교해서) 일반적으로 0으로 채워진다. 논리 시프트는 피연산자가 숫자보다 비트의 수열로 처리될때도 사용된다. (ko) Unter einer logischen Verschiebung (engl. logical shift) versteht man in der Informatik einen bitweisen Operator, der alle Bits des Operanden verschiebt. Die logische im Gegensatz zur arithmetischen Verschiebung erhält weder das Vorzeichenbit noch unterscheidet sie zwischen dem Exponenten und der Mantisse einer Zahl. Jedes Bit des Operanden wird einfach um eine gegebene Positionsanzahl verschoben und die entstehenden Bit-Positionen werden, in der Regel mit Nullen, aufgefüllt. Eine logische Verschiebung wird oft genutzt, wenn der Operand als Sequenz von Bits und nicht als Zahl betrachtet wird. (de) In computer science, a logical shift is a bitwise operation that shifts all the bits of its operand. The two base variants are the logical left shift and the logical right shift. This is further modulated by the number of bit positions a given value shall be shifted, such as shift left by 1 or shift right by n. Unlike an arithmetic shift, a logical shift does not preserve a number's sign bit or distinguish a number's exponent from its significand (mantissa); every bit in the operand is simply moved a given number of bit positions, and the vacant bit-positions are filled, usually with zeros, and possibly ones (contrast with a circular shift). (en) Przesunięcie bitowe – operacja na liczbach w systemie dwójkowym polegająca na przesunięciu wszystkich cyfr binarnych o pozycji w lewo lub prawo. Jest to działanie powszechnie stosowane w elektronice i informatyce. Najczęściej przesunięcie wykorzystuje się do szybkiego mnożenia/dzielenia przez liczbę 2 i jej potęgi oraz do sekwencyjnego testowania wartości poszczególnych bitów. W cyfrowych układach elektronicznych przesunięcie bitowe realizowane jest przez rejestry przesuwające. W różnych językach programowania istnieją funkcje bądź operatory, realizujące przesunięcie: (pl)
rdfs:label Logische Verschiebung (de) Logical shift (en) 논리 시프트 (ko) Przesunięcie bitowe (pl) Логічний зсув (uk)
owl:sameAs freebase:Logical shift wikidata:Logical shift dbpedia-de:Logical shift dbpedia-fa:Logical shift dbpedia-ko:Logical shift dbpedia-pl:Logical shift dbpedia-ro:Logical shift dbpedia-sk:Logical shift dbpedia-uk:Logical shift https://global.dbpedia.org/id/BupC yago-res:Logical shift
prov:wasDerivedFrom wikipedia-en:Logical_shift?oldid=1121632710&ns=0
foaf:depiction wiki-commons:Special:FilePath/Rotate_right_logically.svg wiki-commons:Special:FilePath/Rotate_left_logically.svg
foaf:isPrimaryTopicOf wikipedia-en:Logical_shift
is dbo:wikiPageDisambiguates of dbr:Shift
is dbo:wikiPageRedirects of dbr:Logical_left_shift dbr:Logical_right_shift dbr:Logical_shift_left dbr:Shift_Left dbr:Logical_shift_right dbr:Shift_left
is dbo:wikiPageWikiLink of dbr:Canonical_Huffman_code dbr:Binary-coded_decimal dbr:Verilog dbr:0x88 dbr:Compressed_instruction_set dbr:NAR_2 dbr:QARMA dbr:Omega_network dbr:Arithmetic_shift dbr:Linear_congruential_generator dbr:Marching_squares dbr:DEC_Alpha dbr:Fast_inverse_square_root dbr:Strength_reduction dbr:Binary_multiplier dbr:Bit_field dbr:Bitwise_operations_in_C dbr:Software_portability dbr:Circular_shift dbr:Operators_in_C_and_C++ dbr:Carry-save_adder dbr:Shift_operator dbr:X86_instruction_listings dbr:Xorshift dbr:SHL dbr:SHR dbr:SLW dbr:Shift dbr:Undefined_behavior dbr:Logical_left_shift dbr:Logical_right_shift dbr:Little_Computer_3 dbr:LSR dbr:Logical_shift_left dbr:SYN_cookies dbr:Sign_extension dbr:Word_RAM dbr:Shift_Left dbr:Logical_shift_right dbr:Shift_left
is foaf:primaryTopic of wikipedia-en:Logical_shift