The Hardware Side of Cryptography

20 July 2008

Implementing 128-bit Fibonacci Number Generator on PIC16F84

Filed under: number generator — Tags: , , , , — edipermadi @ 2:21 pm

Fibonacci was a commonly known sequence on numbers. Its sequence behaves recursively as F(n) = F(n-1) + F(n-2). In addition fibonacci number grows massively as its index increments, therefore we need such large binary representation in order to compute high order fibonacci number. Below are examples of some fibonacci numbers.

Example : 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765,…

Here, i wrote a code that able to generate any fibonacci numbers that fit into 128-bit binary system. So far, i found that the largest fibonacci number that fit on 128-bit binary representation was 3.328511 x 1038 which actually the 186-th fibonacci number. The code here was developed and simulated using MPLAB v8.0 and it works well. Next time, i’ll try to develop 2048-bits or perhaps 4096-bits fibonacci number generator hopefully🙂 .

For more detail explanation, please consider Fibonacci Number article on Wikipedia.

Screenshot

You may freely use this code under the GNU Public License v3.0. Cheers .

RELATED STUFF

Download:
Source Code v1.0
PIC16F84 Datasheet
Mid-Range Reference Manual
MPLAB v8.0

Referrence:
Fibonacci Number

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: