Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to understand the bytes occupied by VB data type?
How to understand the bytes occupied by VB data type?
You must pass the computer level 2 exam, right?

First of all, a byte is an 8-bit binary number, and the numbers used in real life are all binary numbers in computers;

1), 2 bytes, which means that VB provides a binary memory space of 16 for plastic data. For example, in VB, the number "5" is in the form of "000000001kloc-0/".

2) Long integer, 4 bytes, 32 bits of memory space. Similarly, the number "5" as long integer data in VB is "000000000000000000001065438".

In your example: defined as plastic surgery,111takes up two bytes; When defined as a long integer,111occupies four bytes.

This is why long integers can represent numbers larger than integers.