<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/BitLRotate?action=history&amp;feed=atom</id>
	<title>BitLRotate - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/BitLRotate?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=BitLRotate&amp;action=history"/>
	<updated>2026-05-09T22:01:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=BitLRotate&amp;diff=46733&amp;oldid=prev</id>
		<title>Necktrox: Added page for bitLRotate</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=BitLRotate&amp;diff=46733&amp;oldid=prev"/>
		<updated>2016-02-21T21:37:56Z</updated>

		<summary type="html">&lt;p&gt;Added page for bitLRotate&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Shared function}}&lt;br /&gt;
&lt;br /&gt;
This functions performs a bitwise circular left-rotation on the integer '''value''' by integer '''n''' positions.&lt;br /&gt;
See [https://en.wikipedia.org/wiki/Bitwise_operation#Rotate_no_carry Bitwise operation] for more details.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int bitLRotate ( int value, int n )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''value:''' The value you want to perform the rotation on.&lt;br /&gt;
*'''n:''' The amount of positions to rotate the value by.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the circular left-rotated value as ''integer''.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example shows the usage of the function [[bitLRotate]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local value = 0xF -- binary: 1111, decimal: 15&lt;br /&gt;
local positions = 0x1 -- binary: 0001, decimal: 1&lt;br /&gt;
local shifted = bitLRotate( value, positions ) -- binary: 0001 1110, decimal: 30&lt;br /&gt;
&lt;br /&gt;
local value = 0xF -- binary: 1111, decimal: 15&lt;br /&gt;
local positions = 0x3 -- binary: 0011, decimal: 3&lt;br /&gt;
local shifted = bitLRotate( value, positions ) -- binary: 0111 1000, decimal: 120&lt;br /&gt;
&lt;br /&gt;
local value = 0x3F -- binary: 0011 1111, decimal: 63&lt;br /&gt;
local positions = 0xA -- binary: 1010, decimal: 10&lt;br /&gt;
local shifted = bitLRotate( value, positions ) -- binary: 1111 1100 0000 0000, decimal: 64.512&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Bit_functions}}&lt;/div&gt;</summary>
		<author><name>Necktrox</name></author>
	</entry>
</feed>