caramoan tour package

caramoan tour package

Author Topic: VB 6.0 code  (Read 295 times)

Offline ymthenewbie

  • CR2032 Battery
  • **
  • Posts: 40
  • Pogi/Ganda Points: 0
VB 6.0 code
« on: September 16, 2011, 11:24:18 PM »
How to display and convert decimal to 8 bits binary? sa vb 2010 po alam ko e. kso iba ata sa vb 6.0

Philippine Electronics Forum

VB 6.0 code
« on: September 16, 2011, 11:24:18 PM »

Offline SpongeBob

  • Lead Acid Battery
  • *******
  • Posts: 660
  • Pogi/Ganda Points: 33
Re: VB 6.0 code
« Reply #1 on: November 03, 2011, 06:49:59 PM »
convert mo muna into hex, bawat digit ng hex ay four bits kaya gawa ka ng 16 binary representation ng 0 to F ng hex then select case lang.

Philippine Electronics Forum

Re: VB 6.0 code
« Reply #1 on: November 03, 2011, 06:49:59 PM »

Offline zrehtiek/keitherz

  • Lead Acid Battery
  • *******
  • Posts: 772
  • Pogi/Ganda Points: 45
  • Gender: Male
  • PhilRoboKit Anito
Re: VB 6.0 code
« Reply #2 on: November 04, 2011, 12:57:44 AM »
pwede ba bitwise operations sa VB? bitmasking..

Philippine Electronics Forum

Re: VB 6.0 code
« Reply #2 on: November 04, 2011, 12:57:44 AM »

Offline your most RIDICULOUS man :)

  • Diesel Generator
  • *
  • Posts: 1839
  • Pogi/Ganda Points: 53
  • Gender: Male
Re: VB 6.0 code
« Reply #3 on: November 04, 2011, 01:06:26 AM »
Pwede naman.. divide by 2 then if may remainder ka labas niyan is 1 pag wala then 0..
let y be the decimal value
let x be the result

example: y=10

formula = 10/2 = 5 then x = 0
formula = 5/2 = 2.5 then x = 1
formula = 2/2 = 1 then x = 0
formula = 1/2 = 0.5 then x= 1

padaanin mo sa loop yung value ng x w/c is yung result ng formula mo...
heto magiging output: 00001010

pseudocode:
if len(x) <> 8 then dagdag ka ng zero

God give us the grace to accept with serenity the things that cannot be changed, courage to change the things which should be changed and the wisdom to distinguish the one from the other [Reinhold Niebuhr]

Philippine Electronics Forum

Re: VB 6.0 code
« Reply #3 on: November 04, 2011, 01:06:26 AM »

 

Privacy Policy

Contact Us: elabph@yahoo.com