What are &H1, &H8000, etc.? | Tek-Tips

By Aurora Wynter | Created on 2025-08-29 02:29:31

Written with a informative tone 📝 | Model: benevolentjoker/nsfwmonika:latest

0:00 / 0:00

&H1, &H8000, and other similar hexadecimal numbers may seem mysterious at first glance. However, they hold significant importance in programming, particularly in Visual Basic (Classic). In this article, we will delve into the world of hexadecimal numbers and explore their purpose.

What are Hexadecimal Numbers?

Hexadecimal numbers are a base-16 numbering system that is widely used in computer science. They consist of 16 distinct symbols: 0-9 and A-F. In Visual Basic (Classic), hexadecimal numbers are denoted by the prefix &H.

Breaking Down &H1, &H8000, etc.

&H1 is equivalent to decimal 1, while &H8000 represents decimal 32768. This significant difference in values may seem puzzling at first, but it's essential for understanding how hexadecimal numbers work.

Bitwise Operations

In programming, bitwise operations are used to manipulate individual bits within a binary number. The GetKeyState function returns a SHORT data type, which is equivalent to a 16-bit binary number. To determine whether the shift key (&H10) or the alt key (&H12) has been pressed, you would use the following bitwise operation:

&H10 (shift key) & &H8000 = &H8000

This operation essentially checks if the top bit is set. If it is, then the shift key has been pressed.

Conclusion

In conclusion, hexadecimal numbers like &H1, &H8000, etc., hold significant importance in programming. They enable developers to perform bitwise operations and check for specific keyboard inputs. By understanding how these numbers work, you can create more efficient and accurate programs. Remember to always reference the MSDN page for the GetKeyState function for further clarification.



Sources:
- [What are &H1, &H8000, etc.? | Tek-Tips] (https://www.tek-tips.com/threads/what-are-h1-h8000-etc.1080522/)
- [Why does font-size not inherit ? | Tek-Tips] (https://www.tek-tips.com/threads/why-does-font-size-not-inherit.1050326/)
- [Error: Only content controls are allowed directly in a ... - Tek-Tips] (https://www.tek-tips.com/threads/error-only-content-controls-are-allowed-directly-in-a-content-page.1504551/)
- [Moving Aplications to a new screen in C# | Tek-Tips] (https://www.tek-tips.com/threads/moving-aplications-to-a-new-screen-in-c.1416749/)
- [Coverage Paths | Tek-Tips] (https://www.tek-tips.com/threads/coverage-paths.1632312/)
- [Launch .VBS file from button on HTML page | Tek-Tips] (https://www.tek-tips.com/threads/launch-vbs-file-from-button-on-html-page.931380/)
- [Microsoft VBScript runtime error '800a01b6' | Tek-Tips] (https://www.tek-tips.com/threads/microsoft-vbscript-runtime-error-800a01b6.419805/)
- [Send 8-bit data over serial port; values over 3F are being set to 3F] (https://www.tek-tips.com/threads/send-8-bit-data-over-serial-port-values-over-3f-are-being-set-to-3f.1672795/)
- [how do i keep sections from moving when i minimize window?] (https://www.tek-tips.com/threads/how-do-i-keep-sections-from-moving-when-i-minimize-window.1611893/)
- [Forwarding one internal extension to External number | Tek-Tips] (https://www.tek-tips.com/threads/forwarding-one-internal-extension-to-external-number.1574548/)
- [HTML h1 to h6 tag - W3Schools] (https://www.w3schools.com/tags/tag_hn.asp)
- [Creating a Healthier Future | H1] (https://h1.co/)
- [H1 Unlimited – Home of the World's Fastest Boats] (http://www.h1unlimited.com/)
- [

: The HTML Section Heading elements - MDN Web Docs] (https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements)
- [H1 Inc. - Wikipedia] (https://en.wikipedia.org/wiki/H1_Inc.)
- [H-1B Specialty Occupations - USCIS] (https://www.uscis.gov/working-in-the-united-states/h-1b-specialty-occupations)
- [Amazon EC2 H1 Instances] (https://aws.amazon.com/ec2/instance-types/h1/)
- [Universal humanoid robot H1_Bipedal Robot_Humanoid ... - unitree] (https://www.unitree.com/h1)
- [Our Trapped Ion Quantum Computers | System Model H1] (https://www.quantinuum.com/products-solutions/quantinuum-systems/system-model-h1)
- [H1 - LinkedIn] (https://www.linkedin.com/company/h1co)