Help - Search - Members - Calendar
Full Version: Doing Binary Arithmetic
Linuxhelp > Support > Tips and Tricks
jem
Hi All
I want to AND two binary numbers (eg 1001011 AND 1110010 to get 1000010). Are there any tools available to do this from a shell script?
jem
http://www.freeos.com/guides/lsst/ch04sec14.html uses "bc".
bc can calculate with binary numbers using the -ibase=2 switch but it can't do a logical AND on them.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.