This documentation is out of date.

The new version of the documentation is here: https://cannylogic.com/docs

Difference between revisions of "Right rotationо"

From CANNY Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Created page with " <div style="float:right;margin:5px;"> {|class="cannytable" width="350px" |- !colspan="2" style="background-color:#AFEEEE;"|Внешний вид |- |colspan="2" align="cent...")
 
(Blanked the page)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
  
<div style="float:right;margin:5px;">
 
 
{|class="cannytable" width="350px"
 
|-
 
!colspan="2" style="background-color:#AFEEEE;"|Внешний вид
 
|-
 
|colspan="2" align="center" style="padding:10px;"|[[Изображение:5_4_7_2.png]]
 
|-
 
!colspan="2" style="background-color:#AFEEEE;"|Символьное обозначение
 
|-
 
|colspan="2" align="center"|RSR
 
|-
 
!colspan="2" style="background-color:#AFEEEE;"|Группа
 
|-
 
|colspan="2" align="center"|[[Справочник по встроенным функциональным блокам#Побитовые логические операции | Побитовые логические операции]]
 
|-
 
!colspan="2" style="background-color:#AFEEEE;"|Входы
 
|-
 
|style="padding-left:1em;"|Значение:
 
|style="padding-left:1em;"|[[Язык CFD#Данные|числовой]]
 
|-
 
|style="padding-left:1em;"|Сдвиг, бит:
 
|style="padding-left:1em;"|[[Язык CFD#Данные|числовой]]
 
|-
 
!colspan="2" style="background-color:#AFEEEE;"|Выходы
 
|-
 
|style="padding-left:1em;"|Результат:
 
|style="padding-left:1em;"|[[Язык CFD#Данные|числовой]]
 
|-
 
!colspan="2" style="background-color:#AFEEEE;"|Версия [[CANNY Lab]]
 
|-
 
|colspan="2" align="center"|с 1.8
 
|}
 
</div>
 
 
<div style="min-height:100%;display:block;">
 
<div style="float:left;width:70px;">
 
[[Изображение:5_4_8_1.png|left|Иконка]]
 
</div>
 
 
<div>
 
Logical shift to the right. Set the output result as the logical right shift in binary representation of the input "Value", the number of bits to shift specified by the input "Shift, bit", while leaving bit appears in place of free pop spot on the other end of the number..
 
</div>
 
</div>
 
<br clear="left">
 
In other words, the result is equivalent to the result of copying each bit in binary representation of input "value" to its left position, to the number of times specified by the value of the input "Shift, bit". Thus, least significant (right-most) bit in the binary representation each time will have a value equal to the outgoing (most significant, extending to the left) bit of input value.
 
Иными словами, результат эквивалентен результату операции копирования каждого бита в двоичном представлении входа «Значение» в позицию справа от него, произведенной число раз, заданное значением входа «Сдвиг, бит». При этом старший (самый левый) бит в двоичном представлении результата каждый раз получает значение, равное уходящему (самому младшему, выдвигаемому вправо) биту входного значения.
 
 
Например:
 
 
{|border="0" style="border-collapse:collapse;"
 
|-
 
|style="padding:5px;"|Значение
 
|style="padding:5px;"|=
 
|style="padding:5px;"|51000
 
|style="padding:5px;"|=
 
|style="padding:5px;"|0xC738
 
|style="padding:5px;"|=
 
|style="padding:5px;"|0b1100011100111000
 
|-
 
|style="padding:5px;"|Сдвиг, бит
 
|style="padding:5px;"|=
 
|align="center"|2
 
|align="center"|
 
|-
 
|style="padding:5px;"|Результат
 
|style="padding:5px;"|=
 
|style="padding:5px;"|12750
 
|style="padding:5px;"|=
 
|style="padding:5px;"|0x31CE
 
|style="padding:5px;"|=
 
|align="center"|0b0011000111001110
 
|}
 
 
== Особенности ==
 
 
Операция циклического сдвига 16-и битного значения в любую сторону на 8 бит меняет местами его старший и младший байты.
 
 
== Примеры ==
 
{|
 
|[[Изображение:5_4_8_3.png|thumb|400px|Десятичное представление]]
 
|[[Изображение:5_4_8_4.png|thumb|500px|Двоичное представление]]
 
|}
 
 
== Смотри также ==
 
[[Побитовое И]]
 
 
[[Побитовое ИЛИ]]
 
 
[[Побитовое исключающее ИЛИ]]
 
 
[[Побитовое НЕ]]
 
 
[[Сдвиг влево]]
 
 
[[Сдвиг вправо]]
 
 
[[Циклический сдвиг влево]]
 
 
[[Справочник по встроенным функциональным блокам | Встроенные функциональные блоки]]
 

Latest revision as of 07:06, 19 November 2015