Tip - Get a calculator that can use HEX, BIN etc!

Basic and Machine Language

Moderator: Moderators

User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Octal numbers are used in the chmod command in Un*x. In former times there were machines with 6-bit bytes (as the CDC's), where 2-digit octal numbers "naturally" fit into.

And, to get back to:

[...]decimal equivalence of $7CBA?[...]

I just could ask, what is the hexadecimal equivalence of 1048576? $100000, of course! One should use that number system, where the numbers are expressed in the easiest way. The choice between Hex and Binary is then only a matter of convenience, with Hex grouping 4 (itself a power of 2!) binary digits into one.

Michael
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

I meant some more VIC programming related than file permissions in Unix.

What is the easiest representations of 57005, 48879 and 3735928559 by the way?
Anders Carlsson

Image Image Image Image Image
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

First of all: 3735928559=57005*65536+48879

And they are useful values to indicate uninitialised memory, when read in Hex. ;)
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

By the way, 4711 in decimal equals 11147 in octal. Spooky!
Anders Carlsson

Image Image Image Image Image
User avatar
Schema
factor
Posts: 1440
Joined: Tue Mar 23, 2004 7:07 am
Website: http://www.jammingsignal.com
Location: Toronto, Ontario

Post by Schema »

Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Btw, Hesmon can convert between HEX and DEC and also add and subtract HEX values...

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Besides HEX, BIN, DEC and OCT, my calculator can also use PEN (base 5). Have you ever heard of a use for that?

/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
vic user
VicGyver
Posts: 1401
Joined: Thu Mar 25, 2004 9:40 am

Post by vic user »

(base 5). Have you ever heard of a use for that?
yes, it is used by accountants who also surf for porn.

chris
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Or rather accountants who are used to count on their fingers. Decimal works too, but in a pental (?) number system, you easily get the number of hands (and number of number of hands) required.
Anders Carlsson

Image Image Image Image Image
idrougge
Vic 20 Hobbyist
Posts: 100
Joined: Wed Oct 06, 2004 8:57 am

Post by idrougge »

I read somewhere that the vikings tended to count in pentads.
C128, C128D, C64, C64C, ABC80, ABC800, ABC806, 130XE, ZX81, Spectrum 48k, Dragon 32, TI99/4A, Laser 200, Spectravideo 328, Sord M5, VIC20...
Post Reply