I'm using the Unicode character "Double-Stroke Not Sign" (U+2AEC) to represent bitwise logical not operation (a.k.a. one's complement). I've implemented a control sequence called \blnot which accomplishes this, but my solution feels kludgey and I suspect there must be a best-practices solution which is much cleaner. Here is how my output looks with $-$, \lnot, and \blnot, respectively:

My question is two parts:
What is the cleanest way to stack two
\lnotoperators as shown above? I made an\hboxand used\raiseboxto adjust the base of each instance, but I don't like how I used\kern-.666666emto back up 2/3 em after the first instance. I feel like there should be a way to cleanly go back the exact width of\lnotwithout having to know it, or better yet simply to not advance at all between the two.I would also like to insert approximately .11em after both
\lnotand\blnotbecause it looks too tight otherwise. (I'll be using\blnotmostly with multi-character identifiers in italics.) I've added the space this by saying\kern.11em, but again that feels kludgey to me. Ideally, I'd like to inuit the width of$-$and simply use that, without hard-coding any width.
Here's an MWE:
\documentclass{article}
\newcommand{\blnot}{
\mathord{%
\hbox{%
\raisebox{.19ex}{$\lnot$}\kern-.666666em%
\raisebox{-.21ex}{$\lnot$}%
}%
}%
}
\begin{document}
$-a$ \vskip -1ex
$\lnot\kern.11em a$ \vskip -1ex
$\blnot\kern.11em a$ \par
\end{document}
p.s. I know I could easily implement this using TikZ, but stacking two \lnots seems easier to make work at multiple font sizes. (I won't probably be using this at any size other than 10pt, but I might use it in a footnote or a caption.)


$-$? Wrap the\ooaligninside an\hboxwith\rlapand\hphantom? I did that, and it seemed to work great. (2) Is there a good tutorial on\ooalign? I did some web searches and only turned up obscure examples. (3) The fact that the bounding box is larger than necessary in my version...is that actually a problem? It doesn't seem to be problematic unless the upper\lnotis raised about 1.2ex higher. – Todd Lehman Jan 15 '12 at 10:56\hboxwas clobbering the super/sub-script sizes. It worked fine when I did\scriptsize, but it fails, as you point out, in actual superscripts and subscripts. I probably won't be using this symbol in superscripts or subscripts, but it's really nice to see an example of how to make that work. I didn't know about\mathpalette, although I have a tiny bit of experience with\mathchoice. I'll read up on\mathpalettetomorrow so I can understand what is going on under the hood here. :) – Todd Lehman Jan 15 '12 at 11:22\ooalign. I just modified one of my other stacking symbol commands to use it where my bounding boxes had been slightly a bit too tall, causing a bit of unwanted space between lines. But now, with\ooalign, the line spacing is constant even if I stack a symbol so high that it protrudes all the way up into the line above it. (Not that I would do that for real, but I tested it that way just to be sure.) Nifty. – Todd Lehman Jan 15 '12 at 11:58\rlapsolution earlier, but your\ooalignsolution seems a safer way to go, and a better habit to get into for this sort of thing. – Todd Lehman Jan 15 '12 at 12:00