A first stab at BaseN encoding with a focus on general alphabet encoding.

The comments in the code-only article are fairly decent, but I dislike being extremely verbose in my commenting because then I can't see my code. A little explanation of the problem is probably in order because of the lack of extremely verbose comments. First, what is base N encoding or alphabet encoding?

Most people assume that encoding into any base in some way equates to mapping a number to some digits, plus some additional characters to represent values we don't have digits for. This isn't always the case. An integer encoded as Alphabet{0,1} = 1001 = 9 decimal is identical to Alphabet{+,-} = -++- = 9 decimal. I've just change the represenation or alphabet, but the base is still the same (aka base 2).

Explaining bases could take a few years of college courses, as you take the concepts and create increasingly more abstract versions of them. In fact, bases are strange things in some theoretical maths where concepts of groups, colors, stripes, and other words are used to describe how they work. A very simplistic view of the base is available over on Mathworld. In general though, the concept is that any base has a number of digits equal to the base number b (aka radix) where the digits represent the values 0 through b-1. That is easy enough, and it gives us a very generic method for converting a number to any alphabet and back.

To start, we'll denote an alphabet as a char[] of digits. Digit in this sense is any character that will represent the array index at which it is placed. The base of the alphabet is the length of the character array. The first element in the array at offset {0} has a value of 0 and for all other indices n greater than 0 the value of the digit at n is equal to the index n. That's all there is to it. Any alphabet of characters can now be translated to and from an integer using this mapping table and the base.

Code-Only: Arbitrary alphabet encoding (aka BaseN encoding) for base2 through base36.

Published Sunday, November 07, 2004 3:45 PM by Justin Rogers
Filed under:

Comments

Sunday, April 10, 2005 8:03 AM by TrackBack

# re:A first stab at BaseN encoding with a focus on general alphabet encoding.

^_^,Pretty Good!
Friday, April 25, 2008 3:43 PM by math.kellyg@recursor.net

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

a few years of college courses?  come on, you mean a few hours

Wednesday, August 19, 2009 9:50 AM by medyum

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

a few years of college courses?  come on, you mean a few hours

Thursday, October 15, 2009 10:49 AM by poori

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

What application for windows will sync your notes from your iPhone back to your computer with the new 3.0 software? Any answers will help. Thanks!

________________

<a href="www.youtube.com/watch iphone</a>

Wednesday, October 21, 2009 1:33 AM by poori

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Well my iphone finally did it died. I m leaving the states for a few months and i will need a knew phone, all stores near me are sold out of the iphone 3g S. So i was wondering what would be the easiest phone to grasp after using an iphone for a year.

________________

<a href="http://unlockiphone3g.webs.com">how to unlock iphone</a>

Wednesday, June 23, 2010 11:55 PM by cheap mlb jerseys

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

In general though, the concept is that any base has a number of digits equal to the base number b (aka radix) where the digits represent the values 0 through b-1.

Thursday, September 02, 2010 12:04 AM by whosale newera cap

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Enjoy them ,share them ,latest new era hat fashion design at http://www.capssupplier.com

Saturday, March 05, 2011 1:17 AM by Sara Meetington

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

It was rather interesting for me to read that article. Thanx for it. I like such themes and everything connected to this matter. I would like to read more on this blog soon.      

Sara  Meetington    

<a href="www.jammer-store.com/">mobile phone jammer circuit</a>

Wednesday, March 16, 2011 6:54 PM by Brandy Stepman

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

It was certainly interesting for me to read the article. Thanks for it. I like such themes and anything connected to this matter. I would like to read more on this site soon.        

Brandy  Stepman      

<a href="rome-escort.info/">escort girls a roma</a>

Thursday, March 24, 2011 10:04 PM by Nicky Meetington

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

It is certainly interesting for me to read the post. Thanx for it. I like such themes and everything that is connected to this matter. I would like to read a bit more on that blog soon.        

Nicky  Meetington        

<a href="www.phone-blocker.com/">phone jammer uk</a>

Thursday, April 07, 2011 5:34 AM by mulberry handbags

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Mulberry Outlet Store is a top brand in the UK. Our Mulberry bags offers all kinds of mulberry sale with unique design and fashion style. What's more, the Mulberry Bags are on sale now, you can find any latest design that you are looking for here, and get them at the best price.

Come here, you will find a best mulberry factory shop. mulberry handbags is one key point of our Mulberry outlet shop. Discount Mulberry sales are on at the moment.

Friday, April 08, 2011 3:20 AM by Jenny Karver

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

It was certainly interesting for me to read this post. Thank author for it. I like such topics and everything connected to them. I would like to read a bit more on this blog soon.          

Jenny  Karver          

<a href="milanescorts.com/">accompagnatrice escort cinese milano</a>

Saturday, April 16, 2011 9:53 PM by Sara Stone

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

It was certainly interesting for me to read this post. Thanks for it. I like such themes and everything that is connected to this matter. I would like to read more soon.            

Sara  Stone          

<a href="www.baccaratgirls.com/">escort UK</a>

Wednesday, April 27, 2011 2:23 PM by Mary Flouee

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

It was certainly interesting for me to read this blog. Thanx for it. I like such topics and everything connected to this matter. I definitely want to read more on this site soon.            

Mary  Flouee            

<a href="monacoescort.com/">monaco call girls</a>

Thursday, August 11, 2011 3:21 AM by coach outlet

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

I read with great interest.Thanks for you sharing.

Saturday, October 29, 2011 3:16 AM by OEM software online

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

LArVHv I read online (computer problems) positive feedback about your resource. Didnt even believe it, and now saw myself. It turned out that I was not fooled!...

Saturday, November 05, 2011 4:56 PM by Download oem software

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Yg15RX Left on my site a link to this post. I think many people will be interested in it..!!

Wednesday, March 07, 2012 11:44 PM by Folder Printing

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

It was rather exciting for me to study that content. Thanx for it. I like such styles and everything linked with this issue. I would like to study more on this site soon.  

Wednesday, March 14, 2012 11:18 AM by escorts Amsterdam

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Nice I probably need to read this text another time to completely understand it... Great job!

Tuesday, March 20, 2012 12:36 AM by Folder Printing

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

I like such styles and everything that is linked with this issue. I would like to study a bit more on that weblog soon.        

Wednesday, April 04, 2012 6:52 PM by Reviews of LifeCell

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Major thankies for the post.Thanks Again. Really Great.

Saturday, April 07, 2012 12:49 AM by new era hats

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

So your wait for a good piece of new era hats ends with the variety offered.

Tuesday, May 01, 2012 10:02 PM by robber

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Hollister provides  the fashionable, high quality and low price of costume, alternative clothing have shirt,skirt, trousers, the knitting garment/woolen sweater, coat, t-shirts, defend the clothes, vest/sling, clothing accessories, and so on, is the best place for your choose and buy.

Friday, May 11, 2012 4:32 PM by bookmarking

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

ezCesm I truly appreciate this article post.Really looking forward to read more. Keep writing.

Wednesday, May 30, 2012 3:08 AM by monster energy hats

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

If you are a person who cares about fashion, I think that you should buy a hats monster energy hats.

Friday, June 08, 2012 2:52 AM by HOLLISTER SALE

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Your site provided us with valuable information to work on|.You have done a marvellous job!by the way to tell you ,your airtical is benifit for mr ,thank you.

Monday, July 02, 2012 5:03 AM by oscilloscope for usb

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

usb oscilloscope:  A new type of pc oscilloscope is emerging that consists of a specialized signal acquisition board (which can be an external USB or PC Parallel port device).

Monday, July 09, 2012 6:25 AM by Seo Services

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

lmRGV1 I value the post.Thanks Again. Awesome.

Thursday, July 12, 2012 6:37 PM by survival seeds

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

I took years of classes in college that I simply didn't really need to take for my major.  I wish I had taken some computer courses, but I decided to become a survival guide instead.  

Friday, August 24, 2012 9:37 AM by trx tactical training

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

trx training for beginners

Friday, October 19, 2012 4:23 AM by gw2 gold

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Great article, just what I was looking for.

Sunday, October 21, 2012 10:25 PM by diablo 3 gold

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Definitely, what a splendid website and illuminating posts, I definitely will bookmark your blog.All the Best!

Monday, October 22, 2012 3:57 AM by Jimmymu4fx

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

bwglb<a href=> justin smith jersey </a>

jmiol<a href=> peyton manning jersey </a>

ldbln<a href=> aldon smith jersey </a>

opmub<a href=> darrelle revis jersey </a>

hjskz<a href=> jamaal charles jersey </a>

Monday, November 05, 2012 7:25 AM by weictenty

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

<a href=http://www.achattdoudounesmagasinn.info>doudoune moncler</a>

A first stab at BaseN encoding with a focus on general alphabet encoding. - Justin Rogers

Sunday, December 02, 2012 8:39 PM by Asorada

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

I beloved as considerably as you may receive carried out appropriate here. The comic strip is attractive, your authored subject matter stylish. nevertheless, you command get got an shakiness more than that you would like be delivering the following. unwell undoubtedly come further beforehand once much more since precisely the similar almost a lot steadily within case you protect this hike.

<a href=www.gravura-laser.com>gravura</a>

<a href=www.gravura-laser.com/.../laser-yag.html>gravura lemn</a>

Wednesday, January 16, 2013 12:07 PM by social bookmarking seo

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Very good article.Much thanks again. Fantastic.

Sunday, January 20, 2013 12:05 PM by Card

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

It's impressive that you are getting thoughts from this piece of writing as well as from our dialogue made here.

Monday, March 11, 2013 12:08 AM by bedspjua@gmail.com

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

This web page won't render appropriately on my droid - you may want to try and fix that

Monday, April 01, 2013 12:47 PM by social bookmarking service

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

3nmpY2 Im thankful for the article. Will read on...

Sunday, April 14, 2013 5:21 AM by Vazquez

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Hello this is kinda of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code

with HTML. I'm starting a blog soon but have no coding experience so I wanted to get guidance from someone with experience. Any help would be enormously appreciated!

Friday, April 19, 2013 7:12 PM by Social bookmarks

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

K6U2ym I really like and appreciate your post.Much thanks again. Really Great.

Monday, April 22, 2013 1:13 PM by Dorsey

# re: A first stab at BaseN encoding with a focus on general alphabet encoding.

Yes! Finally something about moncler online shop.

Leave a Comment

(required) 
(required) 
(optional)
(required)