Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Storing a number of power of 2 into INT field
Message
De
09/06/2017 13:24:08
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01651872
Message ID:
01651877
Vues:
71
>Hi,
>If I store a number of power of 2 into INT field, how many different "values" will this field hold? I am not sure I phrase my question correctly, so here is an example of what I am trying to say.
>Say I store 128 into a INT field. Which means that I can get 7 numbers: 2, 4, 8, 16, 32, 64, 128
>Since an INT field can hold up to 2,147,483,647, what is the max number can I get from this value?
>
>(PS: I didn't have a formal computer education or math education; learned by the seat of my pants).
>
>TIA

Integer can store 32 bits.

you can store more bits into a binary
* 1 millions of bits
x=REPLICATE(0h00,1024*1024/8)
x=BITSET(m.x,800000)
? BITTEST(m.x,800000)
? BITTEST(m.x,800001)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform