PDA

View Full Version : Shifting Bits



chklopper
- 22nd January 2014, 06:57
Hi All

Can someone please help me.

Ive got 20 bits of data that i shiftin the following way.

Temp var word
TempB var word
TempC var Long

Shiftin B3,B2,MSBPost,[Temp\16,TempB\4]

How do i get Temp & TempB into Variable TempC so that TempC would only contain my 20 bits of data.

mackrackit
- 22nd January 2014, 10:08
Just shift everything into TempC
Shiftin B3,B2,MSBPost,[TempC\20]