LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-20-2003, 08:00 PM   #1
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
mon-2 complement, non-8bit byte machines


Hi,

does anyone know of any CPUs out there which do not encode signed integers in 2-complement binary or uses non 8-bit bytes? How crucial is it to handle such scenarios when trying to write code (C/C++) that is portable?
 
Old 11-21-2003, 10:21 AM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"does anyone know of any CPUs out there which do not encode signed integers in 2-complement binary or uses non 8-bit bytes?"

I haven't seen one of those since I programmed an IBM 1440 in 1964.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 11-21-2003, 11:47 AM   #3
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Original Poster
Rep: Reputation: 30
whoa...1964.....a "real" programmer...

anyway, to the other coders out there, is it common practice these days to assume certain things not specified by ISO C/C++ in order to achive practical 'portability'? Personally, I find the Standard to be some sort of a relic at best and at worst, broken since no compiler I know of is able to fully implement it, which kind of defeats the purpose of standardization. Wonder what ur comments are on this?
 
Old 11-21-2003, 02:41 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"Wonder what ur comments are on this?"

You would only need to consider such things as octal machines and zoned decimal arithmetic if you are programming for a museum.

------------------
Steve Stites
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Byte Benchmarks kiwi_bloke Linux - Software 1 08-17-2004 12:07 AM
0 byte logs dsieme01 Linux - Security 5 07-22-2004 10:13 AM
C++ byte type exodist Programming 3 05-11-2004 05:02 PM
backup byte-for-byte axion0917 Linux - Software 2 12-11-2003 05:01 PM
Mon Help Mike_the_Man Linux - General 0 03-15-2001 01:36 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration