While reading through the bash documentation last night I came across “let,” “»” and “«”:
$ let "fluffy = 1<<5"
$ echo fluffy
32
let allows you to assign a value to a variable, « allows you to shift a value X bits to the left (5 in the example above), and » allows you to shift a value X bits to the right. This sure beats running xcalc and/or bc.