flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > Universal Converter of the Numeral Systems.

Author
Thread Post new topic Reply to topic
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
Hi!

I wish to present here written with FASM utility UniCNuS which converts in real time any integer number from the set {0, ..., 2^32-1} denoted in the numeral system with base b є {2, ..., 2^32-1} into a proper representation in the numeral system with base b' є {2, ..., 2^32-1}.

Image


Input data

Data typed into any of the program edit fields are analysed in the real time and the result of this analysis is shown immediately in the other edit controls. Thanks to specific mechanism, edit fields allow to input symbols only from the particular set of characters. There is also impossible to type in a number which exceeds 2^32-1. When the input data are incomplete (improper number or order of brackets in the representation of the given number in numeral system with base b > 10) then text color is changed from brown to red.

Input number denoted in the numeral system with base b > 10 can consist of such digits:

0, ..., 9, (10), ..., (b-1)

Instead digits with values from 10 to 35 Latin letters A, ..., Z can be used. About possibility of using letter symbols informs state of the check box with 'A-Z' label.


Produced results

Content of edit fields can be copied into the clipboard by pushing the button with a picture of two paper sheets or by pressing the hotkey WIN + F11. Copied text is kept in RTF and Unicode formats, so text editors supporting RTF format (as WordPad or Word) will show pasted clipboard content as presented below:

Image

where x is a representation of the given number in the numeral system with base b and x' represents the same number in the system with base b'. Text editors which support only raw text format (as Notepad and UniRed for example) will show the same equality this way:

Image


User interface

Every application control has assigned tooltip which describes its purpose. Moreover, edit fields where number representations in the various numeral systems are input have dynamically generated tooltips wherein allowed digits are listed:

Image

Edit fields have context menus which determine possible edit operations:

Image


Program settings

Before closing of the application window program saves its settings (recently used bases of the numeral systems) in the registry key

HKEY_CURRENT_USER\Software\UniCNuS


Other possibilities

Application can cipher short words as it is shown on the picture below:

Image

Some other interesting examples of the conversions:

Image


Application can be downloaded here.

Project's homepage: http://mikhajduk.houa.org/EN/UniCNuS.php

Because program was designed in 3 language versions here you have also:
Program tested under Windows XP SP3.
Post 11 Nov 2008, 17:56
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
Looks very nice. Thanks for the post.
Post 11 Nov 2008, 18:15
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
In case if you have any problems with downloading program from site here you have archive with English version of application:


Description:
Download
Filename: UniCNuS_EN.zip
Filesize: 8.11 KB
Downloaded: 321 Time(s)



Last edited by MHajduk on 12 Nov 2008, 08:13; edited 1 time in total
Post 11 Nov 2008, 18:31
View user's profile Send private message Visit poster's website Reply with quote
windwakr



Joined: 30 Jun 2004
Posts: 827
Location: Michigan, USA
windwakr
Neat.
Post 12 Nov 2008, 01:47
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Excellent as always.

Any plans to extend the input set (while still keeping the base set as it is now)?

Thanks for sharing it!

PS: BTW, how did you find those ciphering examples? Razz
Post 12 Nov 2008, 02:04
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
all
Thanks for good words. Very Happy

LocoDelAssembly
LocoDelAssembly wrote:
Any plans to extend the input set (while still keeping the base set as it is now)?
Do you mean extending the set of symbols in order to substitute digits (36), ..., (b-1)? It could be useful in some cases (for example in ciphering - here we could use Unicode).

Or you mean extending input set of numbers to "real" numbers (some subset of rational numbers - set of fractions denoted with fixed precision)? It could be done, of course... Wink
LocoDelAssembly wrote:
how did you find those ciphering examples? Razz
Well, I just experimented a bit... Wink
Post 12 Nov 2008, 07:48
View user's profile Send private message Visit poster's website Reply with quote
dead_body



Joined: 21 Sep 2005
Posts: 187
Location: Ukraine,Kharkov
dead_body
nice programm Smile
Post 12 Nov 2008, 10:35
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
Although it seems not to be stated it would appear that the base input boxes are in base-10, perhaps you can also allow for different bases to be use for the base representation. Twisted Evil

All your base are belong to us.
Post 12 Nov 2008, 11:08
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Laughing
Post 12 Nov 2008, 12:05
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Quote:

Or you mean extending input set of numbers to "real" numbers (some subset of rational numbers - set of fractions denoted with fixed precision)? It could be done, of course...

This one Wink But in fact I mean just extend to a much bigger subset of $\mathbb{N} \cup \{0\}$
Post 12 Nov 2008, 13:33
View user's profile Send private message Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto
Bravo! Wink

_________________
Nil Volentibus Arduum Razz
Post 12 Nov 2008, 16:53
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
all
Thanks again. Wink

revolution
Yeah, base input boxes contain bases denoted in decimal numeral system. Smile

LocoDelAssembly
I understand, but moving to the numbers bigger than 2^32-1 will complicate converting procedures. However I think that limit 2^64-1 is quite reachable. Smile
Post 12 Nov 2008, 17:46
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1288
Location: behind the arc
Picnic
Excellent program MHajduk.
Your didn't include the source code this time Mad Smile
Post 19 Nov 2008, 22:27
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
Thank you, thimis. Smile

Most of the solutions in this program were presented in the Simple Password Generator source. Wink
Post 20 Nov 2008, 08:19
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.