Solved

Bitwise shifting

Posted on 1998-10-08
1
208 Views
Last Modified: 2010-04-30
How do I do bitwise shifting in VB
0
Comment
Question by:MikeP090797
1 Comment
 
LVL 2

Accepted Solution

by:
schild earned 10 total points
ID: 1438832
This is simple as you say, you say it by give 15 points :)

to shift to the left just multiple by 2
MyNumner = MyNumner * 2

to shift to the right just divide by 2
MyNumner = MyNumner/2
But this time you need to delete the last bit in case the number was negative so
Do this AND it with the bigest positive number of the variable
In case if byte its 127 so
MyNumner = (MyNumner/2) and 127

Good Luck

Schild
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now