#!/bin/bash

#rm -f lecture1Session.txt
#rm -f lecture1Timing.txt

#test command 
(( 0 && 1 )) # Logical AND
echo $? # 1 ***

# And so ...
let "num = (( 0 && 1 ))"
echo $num # 0

# But ...
let "num = (( 0 && 1 ))"
echo $? # 1 ***
(( 200 || 11 )) # Logical OR
echo $? # 0 ***

# ...
let "num = (( 200 || 11 ))"
echo $num # 1
let "num = (( 200 || 11 ))"
echo $? # 0 ***
(( 200 | 11 )) # Bitwise OR
echo $? # 0 ***

# ...
let "num = (( 200 | 11 ))"
echo $num # 203
let "num = (( 200 | 11 ))"
echo $? # 0 ***

# The "let" construct returns the same exit status
#+ as the double-parentheses arithmetic expansion.


