Bona Fide OS Developer
View unanswered posts | View active topics It is currently Thu Mar 28, 2024 3:51 pm



Post new topic Reply to topic  [ 2 posts ] 
 Fixed-point vs Floating Point 
Author Message

Joined: Fri Aug 20, 2010 10:04 pm
Posts: 41
Post Fixed-point vs Floating Point
http://en.wikipedia.org/wiki/X87

It used to be the case that a 486 int add took 1 cycle and a float add took 20 cycles. For that reason, programmers used fixed-point when they needed speed. With a pentium it was 1 cycle vs 4 cycles.

Today, float arithmitic is about as fast as int.

If you don't know how fixed point arithmetic works, imagine storing money values as a count of pennies.


$2.30 would be 230

$1.20 would be 120

$2.30 + $1.20 would be 230+120



Fixed point usually has a power of two shift value, not 100 as in the case of pennies.

You should learn about binary numbers with decimal points.

101.001

2^2+2^0+2^-3

4+1+1/8

---------------------------
In 1990 I got a job at Ticketmaster programming in VAX assembly language on their operating system.

In 1992 I graduated from ASU with a degree in Computer System Engineering and one thing we covered heavily was fixed-point arithmetic for scientific compution -- working with temperature sensors and stuff on little 8-bit embedded controllers.

In 1992 we did a two-week project, a scheduler (operating system) in one embedded system class.

In 1991/92 I took an operating system course, computer graphic course, numeric methods course, compiler course.

In 1993 when i got a 486 I started LoseThos. I made a multitasking protected mode OS that echoed keyboad to screen.


IN 1991, I took a 2-semester course in 386 assembly. We had a lab where we programmed the PIC, PIT, etc.

In 2003, i started working full time on LoseThos.
You can download LoseThos from the 2004 time period. It was called "Hoppy".
It's all assembly TASM and you launch it from FreeDOS.

This is an internet archive web site. It's a timestamped 2004:
http://web.archive.org/web/20040410044949/www.simstructure.hare.com/OS.htm

In 1984, I did my first interrupt routine in 6502 asm for the Commodore 64.


It's very funny that OSDev thinks I started in 2006.

In 1994 I got a masters degree in electrical engineering (control systems) from ASU.


In 1996 I quit working for Ticketmaster.


Tue Mar 08, 2011 1:51 pm
Profile

Joined: Fri Aug 20, 2010 10:04 pm
Posts: 41
Post Re: Fixed-point vs Floating Point
Nevermind


Tue Mar 08, 2011 10:26 pm
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 7 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin and tweaked by the BF Team.