Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Does anyone know an easy calc formula to convert decimal into hex numbers?

Version: v6.x

Platform: Mac OS 9

This will work for up to 32 bit numbers. And I came up with it before I read the tech article... Sometimes being an old bit-banger actually helps! This version is the instructional version, substitute the actual 2^x numbers to make it execute faster.

Middle("0123456789ABCDEF", Mod( Int(theInteger / 2^28), 2^4) + 1, 1) &

Middle("0123456789ABCDEF", Mod( Int(theInteger / 2^24), 2^4) + 1, 1) &

Middle("0123456789ABCDEF", Mod( Int(theInteger / 2^20), 2^4) + 1, 1) &

Middle("0123456789ABCDEF", Mod( Int(theInteger / 2^16), 2^4) + 1, 1) &

Middle("0123456789ABCDEF", Mod( Int(theInteger / 2^12), 2^4) + 1, 1) &

Middle("0123456789ABCDEF", Mod( Int(theInteger / 2^8), 2^4) + 1, 1) &

Middle("0123456789ABCDEF", Mod( Int(theInteger / 2^4), 2^4) + 1, 1) &

Middle("0123456789ABCDEF", Mod( theInteger, 2^4) + 1, 1)

For those who don't know: a bit-banger is someone who worked on computers with front panel switches and lights (for each bit). The switches allowed data and instructions to be entered and the processor to be stopped, started, and single stepped through instructions. Many were the hours spent debugging operating systems & hardware... Fond memories of my Data General Nova and Teletype ASR-33.

  • Author

just what the doctor ordered - thank you! i'll take a look at the teech articel also.

bitbanger... i love it :-)

  • 3 weeks later...
  • Author

i thought i could just reverse the logic to make decimals from hex numbers. seems to be more involved. is there another formula that can do it or would i need to script it to convert one digit at a time?

This will give you the decimal value of a hex number that's up to 8 digits long:

((((((((

(Position("0123456789ABCDEF",Middle(Right("00000000"&TheHexNumber,8),1,1),1,1 )-1))*16+

(Position("0123456789ABCDEF",Middle(Right("00000000"&TheHexNumber,8),2,1),1,1 )-1))*16+

(Position("0123456789ABCDEF",Middle(Right("00000000"&TheHexNumber,8),3,1),1,1 )-1))*16+

(Position("0123456789ABCDEF",Middle(Right("00000000"&TheHexNumber,8),4,1),1,1 )-1))*16+

(Position("0123456789ABCDEF",Middle(Right("00000000"&TheHexNumber,8),5,1),1,1 )-1))*16+

(Position("0123456789ABCDEF",Middle(Right("00000000"&TheHexNumber,8),6,1),1,1 )-1))*16+

(Position("0123456789ABCDEF",Middle(Right("00000000"&TheHexNumber,8),7,1),1,1 )-1))*16+

(Position("0123456789ABCDEF",Middle(Right("00000000"&TheHexNumber,8),8,1),1,1 )-1))

The field "TheHexNumber" must be text.

  • Author

i wouldn't have come up with this in a million years! thanks much!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.