The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: 0x401000 on June 08, 2010, 01:04:27 PM

Title: Bitwise op
Post by: 0x401000 on June 08, 2010, 01:04:27 PM
A bitwis operation operates on one or two bit patterns or binary numerals at the level of their individual bits. Who ever met a library for assembly language, perform simple operations as not, or, end in this way?

In example

NOT 0111  (decimal 7)
  = 1000  (decimal 8)

   0101 (decimal 5)
OR 0011 (decimal 3)
= 0111 (decimal 7)

Thanks!
Title: Re: Bitwise op
Post by: jj2007 on June 08, 2010, 01:17:45 PM
Why do you need a library for this? There are a number of opcodes, like bt btc not neg etc performing what is necessary.
If it gets more complex, look at records, e.g. here (http://www.masm32.com/board/index.php?topic=13386.0).
Title: Re: Bitwise op
Post by: 0x401000 on June 08, 2010, 02:27:16 PM
Thanks, yes this is exactly what I just did not find. I would like to see examples, and have them always at hand. For example there are programs tutorials to assemble. Examples with assembler command like bt btc not neg etc very desirable. Thanks!