tags:

views:

40

answers:

2
$ bc
BC> ibase=2
BC> 110&101                     // wanna get 100
(standar_in) 8: syntax error

Wikipedia informs that the ops are "|, & and ^". It may be that they work only in certain BC-types or I misread something.

+1  A: 

Those operators are listed in the section 'Missing' operators relative to C, which ends with "... are not available in POSIX bc"

Michael Mrozek
good reason to learn to use C!
A: 

The wikipedia article is pretty clear that these ops aren't in either POSIX bc or gnu bc. The man page has no mention of them either.

ergosys