IMP
a IMP b
Perform a logical implication on two expressions. IMP is equivalent to (NOT a) OR b.
Truth table
a | b | a IMP b |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 0 |
1 | 1 | 1 |
Example 1
print "Truth table"
print
print "0 IMP 0 = "; 0 IMP 0
print "0 IMP 1 = "; 0 IMP 1
print "1 IMP 0 = "; 1 IMP 0
print "1 IMP 1 = "; 1 IMP 1
Example 2
0b10011101
a = 0b11010011
b =
print " "; bin(a)
print "IMP "; bin(b)
print "------------"
print " "; bin(a IMP b)
' output:
' 10011101
' IMP 11010011
' ------------
' 11110011
Code samples using IMP
003 conditional branching.bas
004 loops.bas
100lines.bas
3d wire cube v1.bas
3d wire cube.bas
4tune.bas
7gables.bas
another look at trig functions.bas
base64.bas
betrayal: crows ii.bas
biorythms.bas
blackjack.bas
BlackJack.bas
bolmo.bas
Chaos_1xt.bas
checkers.bas
checkers.bas
chess.bas
chess.bas
circ.bas
crgb.bas
dogstar5.bas
Eliza.bas
eliza.bas
esoteric.bas
Fifty50.bas
first factors mga.bas
integral.bas
irc-bot.bas
Language
AND
AS
BAND
BG
BOR
BYREF
CALL
CASE
CATCH
CONST
DECLARE
DEF
DO
ELIF
ELSE
ELSEIF
END
END TRY
ENDIF
EQV
EXIT
FALSE
FI
FOR
FUNC
GOSUB
GOTO
IF
IFF
IMP
IN
LABEL
LET
LIKE
LOCAL
LSHIFT
MDL
MOD
NAND
NEXT
NOR
NOT
ON
OR
REM
REPEAT
RETURN
RSHIFT
SELECT
STEP
STOP
SUB
THEN
THROW
TO
TRUE
TRY
UNTIL
USE
USG
USING
WEND
WHILE
XNOR
XOR
If there is insufficient information on this page and you wish learn more about IMP,
please send an email to smallbasic@gmail.com. You can help to improve information about
IMP by submitting a pull request,
click View Source for details. Note, an offline language reference text file is also available - see the Download section.