Skip to content

Bitwise Left Shift Assignment Example

In the C programming language, operations can be performed on a bit level using bitwise operators.

Bitwise operations are contrasted by byte-level operations which characterize the bitwise operators' logical counterparts, the AND, OR and NOT operators. Instead of performing on individual bits, byte-level operators perform on strings of eight bits (known as bytes) at a time. The reason for this is that a byte is normally the smallest unit of addressable memory (i.e. data with a unique memory address.)

This applies to bitwise operators as well, which means that even though they operate on only one bit at a time they cannot accept anything smaller than a byte as their input.

Bitwise operators[edit]

C provides six operators for bit manipulation.[1]

SymbolOperator
bitwise AND
bitwise inclusive OR
bitwise XOR (eXclusive OR)
left shift
right shift
bitwise NOT (one's complement) (unary)

Bitwise AND [edit]

bit abit b (a AND b)
000
010
100
111

The bitwise AND operator is a single ampersand: . It is just a representation of AND which does its work on the bits of the operands rather than the truth value of the operands. Bitwise binary AND does the logical AND (as shown in the table above) of the bits in each position of a number in its binary form.

For instance, working with a byte (the char type):

11001000 & 10111000 -------- = 10001000

The most significant bit of the first number is 1 and that of the second number is also 1 so the most significant bit of the result is 1; in the second most significant bit, the bit of second number is zero, so we have the result as 0. [2]

Bitwise OR [edit]

bit abit ba | b (a OR b)
000
011
101
111

Similar to bitwise AND, bitwise OR only operates at the bit level. Its result is a 1 if one of the either bits is 1 and zero only when both bits are 0. Its symbol is which can be called a pipe.

11001000 | 10111000 -------- = 11111000

[2]

Bitwise XOR [edit]

bit abit b (a XOR b)
000
011
101
110

The bitwise XOR (exclusive or) performs a logical XOR function, which is equivalent to adding two bits and discarding the carry. The result is zero only when we have two zeroes or two ones.[3] XOR can be used to toggle the bits between 1 and 0. Thus when used in a loop toggles its values between 1 and 0.[4]

11001000 ^ 10111000 -------- = 01110000

Bitwise NOT / ones' complement (unary)[edit]

bit a (complement of a)
01
10

The ones' complement () or the bitwise complement gets us the complement of a given number. Thus we get the bits inverted, for every bit the result is bit and conversely for every bit we have a bit . This operation should not be confused with logical negation.

~ 11001000 -------- = 00110111

Shift operators[edit]

There are two bitwise shift operators. They are

  • Right shift ()
  • Left shift ()

Right shift [edit]

The symbol of right shift operator is . For its operation, it requires two operands. It shifts each bit in its left operand to the right. The number following the operator decides the number of places the bits are shifted (i.e. the right operand). Thus by doing all the bits will be shifted to the right by three places and so on.

Example:

If the variable contains the bit pattern , then will produce the result , and will produce .

Here blank spaces are generated simultaneously on the left when the bits are shifted to the right. When performed on an unsigned type, the operation performed is a logical shift, causing the blanks to be filled by s (zeros). When performed on a signed type, the result is technically undefined and compiler dependant,[5] however most compilers will perform an arithmetic shift, causing the blank to be filled with the sign bit of the left operand.

Right shift can be used to divide a bit pattern by 2 as shown:

i=14;// Bit pattern 00001110j=i>>1;// here we have the bit pattern shifted by 1 thus we get 00000111 = 7 which is 14/2

Right shift operator usage[edit]

Typical usage of a right shift operator in C can be seen from the following code.

Example:

#include<stdio.h>voidshowbits(unsignedintx){inti;for(i=(sizeof(int)*8)-1;i>=0;i--)(x&(1u<<i))?putchar('1'):putchar('0');printf("\n");}intmain(){intj=5225,m,n;printf("%d in binary \t\t ",j);/* assume we have a function that prints a binary string when given a decimal integer */showbits(j);/* the loop for right shift operation */for(m=0;m<=5;m++){n=j>>m;printf("%d right shift %d gives ",j,m);showbits(n);}return0;}

The output of the above program will be

5225 in binary 00000000000000000001010001101001 5225 right shift 0 gives 00000000000000000001010001101001 5225 right shift 1 gives 00000000000000000000101000110100 5225 right shift 2 gives 00000000000000000000010100011010 5225 right shift 3 gives 00000000000000000000001010001101 5225 right shift 4 gives 00000000000000000000000101000110 5225 right shift 5 gives 00000000000000000000000010100011

Left shift [edit]

The symbol of left shift operator is . It shifts each bit in its left-hand operand to the left by the number of positions indicated by the right-hand operand. It works opposite to that of right shift operator. Thus by doing in the above example we have . Blank spaces generated are filled up by zeroes as above.

Left shift can be used to multiply an integer by powers of 2 as in

inti=4;/* bit pattern equivalent is binary 100 */intj=i<<2;/* makes it binary 10000, which multiplies the original number by 4 i.e. 16 */

A simple addition program Example[edit]

The following program adds two operands using AND, XOR and left shift (<<).

#include<stdio.h>intmain(){unsignedintx=3,y=1,sum,carry;sum=x^y;// x XOR ycarry=x&y;// x AND ywhile(carry!=0){carry=carry<<1;// left shift the carryx=sum;// initialize x as sumy=carry;// initialize y as carrysum=x^y;// sum is calculatedcarry=x&y;/* carry is calculated, the loop condition is evaluated and the process is repeated until carry is equal to 0. */}printf("%u\n",sum);// the program will print 4return0;}

Bitwise assignment operators[edit]

C provides a compound assignment operator for each binary arithmetic and bitwise operation (i.e. each operation which accepts two operands). Each of the compound bitwise assignment operators perform the appropriate binary operation and store the result in the left operand.[6]

The bitwise assignment operators are as follows:

SymbolOperator
bitwise AND assignment
bitwise inclusive OR assignment
bitwise exclusive OR assignment
left shift assignment
right shift assignment

Logical equivalents[edit]

Four of the bitwise operators have equivalent logical operators. They are equivalent in that they have the same truth tables. However, logical operators treat each operand as having only one value, either true or false, rather than treating each bit of an operand as an independent value. Logical operators consider zero false and any nonzero value true. Another difference is that logical operators perform short-circuit evaluation.

The table below matches equivalent operators and shows a and b as operands of the operators.

BitwiseLogical

has the same truth table as but unlike the true logical operators, by itself is not strictly speaking a logical operator. This is because a logical operator must treat any nonzero value the same. To be used as a logical operator requires that operands be normalized first. A logical not applied to both operands won’t change the truth table that results but will ensure all nonzero values are converted to the same value before comparison. This works because on a zero always results in a one and on any nonzero value always results in a zero.

Example:

/* Equivalent bitwise and logical operator tests */#include<stdio.h>voidtestOperator(char*name,unsignedcharwas,unsignedcharexpected);intmain(){// -- Bitwise operators -- ////Truth tables packed in bitsconstunsignedcharoperand1=0x0A;//0000 1010constunsignedcharoperand2=0x0C;//0000 1100constunsignedcharexpectedAnd=0x08;//0000 1000constunsignedcharexpectedOr=0x0E;//0000 1110constunsignedcharexpectedXor=0x06;//0000 0110constunsignedcharoperand3=0x01;//0000 0001constunsignedcharexpectedNot=0xFE;//1111 1110testOperator("Bitwise AND",operand1&operand2,expectedAnd);testOperator("Bitwise OR",operand1|operand2,expectedOr);testOperator("Bitwise XOR",operand1^operand2,expectedXor);testOperator("Bitwise NOT",~operand3,expectedNot);printf("\n");// -- Logical operators -- //constunsignedcharF=0x00;//ZeroconstunsignedcharT=0x01;//Any nonzero value//Truth tables packed in arraysconstunsignedcharoperandArray1[4]={T,F,T,F};constunsignedcharoperandArray2[4]={T,T,F,F};constunsignedcharexpectedArrayAnd[4]={T,F,F,F};constunsignedcharexpectedArrayOr[4]={T,T,T,F};constunsignedcharexpectedArrayXor[4]={F,T,T,F};constunsignedcharoperandArray3[2]={F,T};constunsignedcharexpectedArrayNot[2]={T,F};inti;for(i=0;i<4;i++){testOperator("Logical AND",operandArray1[i]&&operandArray2[i],expectedArrayAnd[i]);}printf("\n");for(i=0;i<4;i++){testOperator("Logical OR",operandArray1[i]||operandArray2[i],expectedArrayOr[i]);}printf("\n");for(i=0;i<4;i++){//Needs ! on operand's in case nonzero values are differenttestOperator("Logical XOR",!operandArray1[i]!=!operandArray2[i],expectedArrayXor[i]);}printf("\n");for(i=0;i<2;i++){testOperator("Logical NOT",!operandArray3[i],expectedArrayNot[i]);}printf("\n");return0;}voidtestOperator(char*name,unsignedcharwas,unsignedcharexpected){char*result=(was==expected)?"passed":"failed";printf("%s %s test, was: %X expected: %X \n",name,result,was,expected);}

The output of the above program will be

Bitwise AND passed, was: 8 expected: 8 Bitwise OR passed, was: E expected: E Bitwise XOR passed, was: 6 expected: 6 Bitwise NOT passed, was: FE expected: FE Logical AND passed, was: 1 expected: 1 Logical AND passed, was: 0 expected: 0 Logical AND passed, was: 0 expected: 0 Logical AND passed, was: 0 expected: 0 Logical OR passed, was: 1 expected: 1 Logical OR passed, was: 1 expected: 1 Logical OR passed, was: 1 expected: 1 Logical OR passed, was: 0 expected: 0 Logical XOR passed, was: 0 expected: 0 Logical XOR passed, was: 1 expected: 1 Logical XOR passed, was: 1 expected: 1 Logical XOR passed, was: 0 expected: 0 Logical NOT passed, was: 1 expected: 1 Logical NOT passed, was: 0 expected: 0

See also[edit]

References[edit]

External links[edit]

Bitwise operators treat their operands as a sequence of 32 bits (zeroes and ones), rather than as decimal, hexadecimal, or octal . For example, the decimal number nine has a binary representation of 1001. Bitwise operators perform their operations on such binary representations, but they return standard JavaScript numerical values.

The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.

The following table summarizes JavaScript's bitwise operators:

OperatorUsageDescription
Bitwise ANDReturns a in each bit position for which the corresponding bits of both operands are 's.
Bitwise ORReturns a in each bit position for which the corresponding bits of either or both operands are 's.
Bitwise XORReturns a in each bit position for which the corresponding bits of either but not both operands are 's.
Bitwise NOTInverts the bits of its operand.
Left shiftShifts in binary representation (< 32) bits to the left, shifting in 's from the right.
Sign-propagating right shiftShifts in binary representation (< 32) bits to the right, discarding bits shifted off.
Zero-fill right shiftShifts in binary representation (< 32) bits to the right, discarding bits shifted off, and shifting in 's from the left.

Signed 32-bit integers

The operands of all bitwise operators are converted to signed 32-bit integers in two's complement format. Two's complement format means that a number's negative counterpart (e.g. 5 vs. -5) is all the number's bits inverted (bitwise NOT of the number, a.k.a. ones' complement of the number) plus one. For example, the following encodes the integer 314:

00000000000000000000000100111010

The following encodes , i.e. the ones' complement of :

11111111111111111111111011000101

Finally, the following encodes i.e. the two's complement of :

11111111111111111111111011000110

The two's complement guarantees that the left-most bit is 0 when the number is positive and 1 when the number is negative. Thus, it is called the sign bit.

The number is the integer that is composed completely of 0 bits.

0 (base 10) = 00000000000000000000000000000000 (base 2)

The number is the integer that is composed completely of 1 bits.

-1 (base 10) = 11111111111111111111111111111111 (base 2)

The number (hexadecimal representation: ) is the integer that is composed completely of 0 bits except the first (left-most) one.

-2147483648 (base 10) = 10000000000000000000000000000000 (base 2)

The number (hexadecimal representation: ) is the integer that is composed completely of 1 bits except the first (left-most) one.

2147483647 (base 10) = 01111111111111111111111111111111 (base 2)

The numbers and are the minimum and the maximum integers representable through a 32bit signed number.

Bitwise logical operators

Conceptually, the bitwise logical operators work as follows:

  • The operands are converted to 32-bit integers and expressed by a series of bits (zeroes and ones). Numbers with more than 32 bits get their most significant bits discarded. For example, the following integer with more than 32 bits will be converted to a 32 bit integer: Before: 11100110111110100000000000000110000000000001 After: 10100000000000000110000000000001
  • Each bit in the first operand is paired with the corresponding bit in the second operand: first bit to first bit, second bit to second bit, and so on.
  • The operator is applied to each pair of bits, and the result is constructed bitwise.

& (Bitwise AND)

Performs the AND operation on each pair of bits. AND yields 1 only if both and are . The truth table for the AND operation is:

. 9 (base 10) = 00000000000000000000000000001001 (base 2) 14 (base 10) = 00000000000000000000000000001110 (base 2) -------------------------------- 14 & 9 (base 10) = 00000000000000000000000000001000 (base 2) = 8 (base 10)

Bitwise ANDing any number with yields . Bitwise ANDing any number with yields .

| (Bitwise OR)

Performs the OR operation on each pair of bits. OR yields 1 if either or is . The truth table for the operation is:

. 9 (base 10) = 00000000000000000000000000001001 (base 2) 14 (base 10) = 00000000000000000000000000001110 (base 2) -------------------------------- 14 | 9 (base 10) = 00000000000000000000000000001111 (base 2) = 15 (base 10)

Bitwise ORing any number with yields . Bitwise ORing any number with yields .

^ (Bitwise XOR)

Performs the XOR operation on each pair of bits. XOR yields 1 if and are different. The truth table for the operation is:

. 9 (base 10) = 00000000000000000000000000001001 (base 2) 14 (base 10) = 00000000000000000000000000001110 (base 2) -------------------------------- 14 ^ 9 (base 10) = 00000000000000000000000000000111 (base 2) = 7 (base 10)

Bitwise XORing any number with yields x. Bitwise XORing any number with yields .

~ (Bitwise NOT)

Performs the NOT operator on each bit. NOT yields the inverted value (a.k.a. one's complement) of . The truth table for the operation is:

 9 (base 10) = 00000000000000000000000000001001 (base 2) -------------------------------- ~9 (base 10) = 11111111111111111111111111110110 (base 2) = -10 (base 10)

Bitwise NOTing any number yields . For example, yields .

Example with :

var str = 'rawr'; var searchFor = 'a'; // This is alternative way of typing if (-1*str.indexOf('a') <= 0) if (~str.indexOf(searchFor)) { // searchFor is in the string } else { // searchFor is not in the string } // here are the values returned by (~str.indexOf(searchFor)) // r == -1 // a == -2 // w == -3

Bitwise shift operators

The bitwise shift operators take two operands: the first is a quantity to be shifted, and the second specifies the number of bit positions by which the first operand is to be shifted. The direction of the shift operation is controlled by the operator used.

Shift operators convert their operands to 32-bit integers in big-endian order and return a result of the same type as the left operand. The right operand should be less than 32, but if not only the low five bits will be used.

<< (Left shift)

This operator shifts the first operand the specified number of bits to the left. Excess bits shifted off to the left are discarded. Zero bits are shifted in from the right.

For example, yields 36:

. 9 (base 10): 00000000000000000000000000001001 (base 2) -------------------------------- 9 << 2 (base 10): 00000000000000000000000000100100 (base 2) = 36 (base 10)

Bitwise shifting any number to the left by bits yields .

>> (Sign-propagating right shift)

This operator shifts the first operand the specified number of bits to the right. Excess bits shifted off to the right are discarded. Copies of the leftmost bit are shifted in from the left. Since the new leftmost bit has the same value as the previous leftmost bit, the sign bit (the leftmost bit) does not change. Hence the name "sign-propagating".

For example, yields 2:

. 9 (base 10): 00000000000000000000000000001001 (base 2) -------------------------------- 9 >> 2 (base 10): 00000000000000000000000000000010 (base 2) = 2 (base 10)

Likewise, yields , because the sign is preserved:

. -9 (base 10): 11111111111111111111111111110111 (base 2) -------------------------------- -9 >> 2 (base 10): 11111111111111111111111111111101 (base 2) = -3 (base 10)

>>> (Zero-fill right shift)

This operator shifts the first operand the specified number of bits to the right. Excess bits shifted off to the right are discarded. Zero bits are shifted in from the left. The sign bit becomes 0, so the result is always non-negative.

For non-negative numbers, zero-fill right shift and sign-propagating right shift yield the same result. For example, yields 2, the same as :

. 9 (base 10): 00000000000000000000000000001001 (base 2) -------------------------------- 9 >>> 2 (base 10): 00000000000000000000000000000010 (base 2) = 2 (base 10)

However, this is not the case for negative numbers. For example, yields 1073741821, which is different than (which yields ):

. -9 (base 10): 11111111111111111111111111110111 (base 2) -------------------------------- -9 >>> 2 (base 10): 00111111111111111111111111111101 (base 2) = 1073741821 (base 10)

Examples

Flags and bitmasks

The bitwise logical operators are often used to create, manipulate, and read sequences of flags, which are like binary variables. Variables could be used instead of these sequences, but binary flags take much less memory (by a factor of 32).

Suppose there are 4 flags:

  • flag A: we have an ant problem
  • flag B: we own a bat
  • flag C: we own a cat
  • flag D: we own a duck

These flags are represented by a sequence of bits: DCBA. When a flag is set, it has a value of 1. When a flag is cleared, it has a value of 0. Suppose a variable has the binary value 0101:

var flags = 5; // binary 0101

This value indicates:

  • flag A is true (we have an ant problem);
  • flag B is false (we don't own a bat);
  • flag C is true (we own a cat);
  • flag D is false (we don't own a duck);

Since bitwise operators are 32-bit, 0101 is actually 00000000000000000000000000000101, but the preceding zeroes can be neglected since they contain no meaningful information.

A bitmask is a sequence of bits that can manipulate and/or read flags. Typically, a "primitive" bitmask for each flag is defined:

var FLAG_A = 1; // 0001 var FLAG_B = 2; // 0010 var FLAG_C = 4; // 0100 var FLAG_D = 8; // 1000

New bitmasks can be created by using the bitwise logical operators on these primitive bitmasks. For example, the bitmask 1011 can be created by ORing FLAG_A, FLAG_B, and FLAG_D:

var mask = FLAG_A | FLAG_B | FLAG_D; // 0001 | 0010 | 1000 => 1011

Individual flag values can be extracted by ANDing them with a bitmask, where each bit with the value of one will "extract" the corresponding flag. The bitmask masks out the non-relevant flags by ANDing with zeroes (hence the term "bitmask"). For example, the bitmask 0100 can be used to see if flag C is set:

// if we own a cat if (flags & FLAG_C) { // 0101 & 0100 => 0100 => true // do stuff }

A bitmask with multiple set flags acts like an "either/or". For example, the following two are equivalent:

// if we own a bat or we own a cat // (0101 & 0010) || (0101 & 0100) => 0000 || 0100 => true if ((flags & FLAG_B) || (flags & FLAG_C)) { // do stuff } // if we own a bat or cat var mask = FLAG_B | FLAG_C; // 0010 | 0100 => 0110 if (flags & mask) { // 0101 & 0110 => 0100 => true // do stuff }

Flags can be set by ORing them with a bitmask, where each bit with the value one will set the corresponding flag, if that flag isn't already set. For example, the bitmask 1100 can be used to set flags C and D:

// yes, we own a cat and a duck var mask = FLAG_C | FLAG_D; // 0100 | 1000 => 1100 flags |= mask; // 0101 | 1100 => 1101

Flags can be cleared by ANDing them with a bitmask, where each bit with the value zero will clear the corresponding flag, if it isn't already cleared. This bitmask can be created by NOTing primitive bitmasks. For example, the bitmask 1010 can be used to clear flags A and C:

// no, we don't have an ant problem or own a cat var mask = ~(FLAG_A | FLAG_C); // ~0101 => 1010 flags &= mask; // 1101 & 1010 => 1000

The mask could also have been created with (De Morgan's law):

// no, we don't have an ant problem, and we don't own a cat var mask = ~FLAG_A & ~FLAG_C; flags &= mask; // 1101 & 1010 => 1000

Flags can be toggled by XORing them with a bitmask, where each bit with the value one will toggle the corresponding flag. For example, the bitmask 0110 can be used to toggle flags B and C:

// if we didn't have a bat, we have one now, // and if we did have one, bye-bye bat // same thing for cats var mask = FLAG_B | FLAG_C; flags = flags ^ mask; // 1100 ^ 0110 => 1010

Finally, the flags can all be flipped with the NOT operator:

// entering parallel universe... flags = ~flags; // ~1010 => 0101

Conversion snippets

Convert a binary to a decimal :

var sBinString = '1011'; var nMyNumber = parseInt(sBinString, 2); alert(nMyNumber); // prints 11, i.e. 1011

Convert a decimal to a binary :

var nMyNumber = 11; var sBinString = nMyNumber.toString(2); alert(sBinString); // prints 1011, i.e. 11

Automate Mask Creation

You can create multiple masks from a set of  values, like this:

function createMask() { var nMask = 0, nFlag = 0, nLen = arguments.length > 32 ? 32 : arguments.length; for (nFlag; nFlag < nLen; nMask |= arguments[nFlag] << nFlag++); return nMask; } var mask1 = createMask(true, true, false, true); // 11, i.e.: 1011 var mask2 = createMask(false, false, true); // 4, i.e.: 0100 var mask3 = createMask(true); // 1, i.e.: 0001 // etc. alert(mask1); // prints 11, i.e.: 1011

Reverse algorithm: an array of booleans from a mask

If you want to create an of from a mask you can use this code:

function arrayFromMask(nMask) { // nMask must be between -2147483648 and 2147483647 if (nMask > 0x7fffffff || nMask < -0x80000000) { throw new TypeError('arrayFromMask - out of range'); } for (var nShifted = nMask, aFromMask = []; nShifted; aFromMask.push(Boolean(nShifted & 1)), nShifted >>>= 1); return aFromMask; } var array1 = arrayFromMask(11); var array2 = arrayFromMask(4); var array3 = arrayFromMask(1); alert('[' + array1.join(', ') + ']'); // prints "[true, true, false, true]", i.e.: 11, i.e.: 1011

You can test both algorithms at the same time…

var nTest = 19; // our custom mask var nResult = createMask.apply(this, arrayFromMask(nTest)); alert(nResult); // 19

For didactic purpose only (since there is the method), we show how it is possible to modify the algorithm in order to create a containing the binary representation of a , rather than an of :

function createBinaryString(nMask) { // nMask must be between -2147483648 and 2147483647 for (var nFlag = 0, nShifted = nMask, sMask = ''; nFlag < 32; nFlag++, sMask += String(nShifted >>> 31), nShifted <<= 1); return sMask; } var string1 = createBinaryString(11); var string2 = createBinaryString(4); var string3 = createBinaryString(1); alert(string1); // prints 00000000000000000000000000001011, i.e. 11

Specifications

Browser compatibility

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

DesktopMobileServer
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung InternetNode.js
Bitwise AND ()Full support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support Yes ? Full support Yes
Bitwise left shift ()Full support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support Yes ? Full support Yes
Bitwise NOT ()Full support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support Yes ? Full support Yes
Bitwise OR ()Full support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support Yes ? Full support Yes
Bitwise right shift ()Full support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support Yes ? Full support Yes
Bitwise unsigned right shift ()Full support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support Yes ? Full support Yes
Bitwise XOR ()Full support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support YesFull support Yes ? Full support Yes

Legend

Full support
Full support
Compatibility unknown
Compatibility unknown

See also