Convert integer to binary, integer to hex and vice versa

 

Dim i As Integer = 128
Dim binary As String
Dim hex As String
Dim binaryToInt As Integer
Dim hexToInt As Integer


binary = Convert.ToString(i, 2)
hex = Convert.ToString(i, 16)
binaryToInt = Convert.ToInt32(binary, 2)
hexToInt = Convert.ToInt32(hex, 16)

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
 
 
 

Total Pageviews

Advertisements

Cool Text: Logo and Graphics Generator
Home