Anonymous user
Bitwise operations: Difference between revisions
m
→{{header|BASIC}}: nl ww + lang tag
m (→{{header|AWK}}: nl ww) |
m (→{{header|BASIC}}: nl ww + lang tag) |
||
Line 162:
=={{header|BASIC}}==
{{works with|QuickBasic|4.5}}
QuickBasic does not have shift or rotate operations defined. Here are the logical operations:
<
PRINT a AND b
PRINT a OR b
PRINT a XOR b
PRINT NOT a
END SUB</
{{works with|FreeBASIC}}
FreeBASIC does not have rotate operators. Shift Right operator performs arithmetic shift if the left value is signed number and logical shift if the left value is unsigned number.
<
DIM u AS UInteger
Line 183 ⟶ 185:
u = a
PRINT "a SHR b (logical) = "; u SHR b
END SUB</lang>
=={{header|C}}==
|