---------- Forwarded message ----------
Date: Sat, 20 Nov 1999 05:36:04 -0600 (CST)
From: Chalupa Chupacabra <bo...@waste.org>
To:
Subject: BCD Saves No Space was: Y2K is Nonsense- Here's Why
> > > (1) go away and learn about BCD, sonny
> >
> > Been there done that. If you can show me where BCD has some advantages
> > such that anybody would actually use it, I'd be thankful.
Still waiting for an answer here. BCD doesn't save any space.
Seems to waste it in fact.
> IBM mainframes from the s/360 onward including S/3, S/34, S/36, S/38, AS400
> plus all PCs (IBM again, remember) store dates as 3 bytes packed BCD - yy mm
> dd.
Why would they do that? 3 bytes BCD (total of 24 bits) actually
takes more space and gives them limitations. It'd make sense to store it
as 5 bits for dd, 4 bits for mm and then use at least 7 bits for the year.
That would save a whole byte AND gives you 28 more years.
> In the case of the 360 this is connected with the inability of the small
> machines to do binary arithmetic.
HUH? I've built binary adders! The idea that somebody would design
something that does BCD but not straight binary math, boggles me. I'm
incredulous actually.
> They were business machines and packed BCD
> was appropriate. Same for the S/3 S/34 S/36 series
Why would BCD ever be appropriate?
> This was copied into many later machines including the PC.
Well I've never doubted that the "PC" (IBM/Intelx86 Microsoft
monstrosity) was trash. :-)
> This is what happened. Face it - history not mathematical theory is the
> determinant of what happens in real life. It is the source of the problem.
I'll grant you that use of BCD would cause problems. My original
dismissal of Y2K was based upon my view that BCD is useless. I see no
reason why anybody would use it. And as I've illustrated several times,
BCD doesn't save space.
> > > (2) then go away again and learn how real time
> > > clock chips are implemented
> >
> > Snotty. All the ones I've ever seen have no problems with 2000. Their
> > design is small and efficient, storagewise. Please give me an example
> > where people would use a method that would cause Y2K problems.
> >
> All common RTC clocks have 8 bit registers that each contain two BCD digits.
I guess I must not work with "common" systems then.
> There is one for years, one for months, one for days. None of them have a
> century register OR a 4 digit year register,
One wouldn't need a "4 digit year register" per se to get out of the 20th
century. A single byte register, added to the (presumed) default epoch or
start date (let's say 1900 though most desktop machines pick a date in the
70's or 80's) would get you to at least 2155 (1900 + 255) and you'd be
using no more space in the RTC than the BCD scheme.
> but all, following the original
> Motorola 6818 RTC have 14 register addresses and at least 50 bytes of
> battery backed RAM for use as the designer sees fit. 64 address locations -
> get it? On the PC this is used to hold the century and the BIOS parameters.
> More modern RTC chips have more RAM - thats all.
So if they have extra space for the century, then why do wintel machines
have so many problems with the 2000 date? I could see if these machine
were made in the 1700's, but come on, ferchrissake. You mean to tell me
programmers have been THAT stupid?
> You've never seen an RTC that has century problems because none of them deal
> with centuries - but several may have leap year problems next year.
I guess I'm just spoiled because I'm around real computers.
> A serial date chip would not have a problem because it doesn't understand
> months or years - just counts days, but there are none of these in common
> use.
Several models of my machine leave it up to the user to get a RTC, but
internally it tracks the passage of time by incrementing a register every
60th of a second.
> As I said, LEARN HOW THE DEVICES WORK before sounding off. Get VIEWCMOS.EXE
> from
I know how they work, electronically. I just find it ludicrous that
anybody would use BCD-- especially since the advent of the Apple and
PETs (1976). I can get VIEWCMOS.EXE, but don't assume I do x86.
I don't. I guess this gives me one more reason to look down my nose on
VHS and Wintel. :-)
> http://www.rightime.com
>
> and you can see the nice BCD time & date ticking up for yourself.
Great. Not that it addresses my basic question-- "Why would anybody use
BCD for dates?"
> ACCEPT current-date FROM DATE
>
> will only return a 6 digit number in all versions of COBOL prior to the
> COBOL 90 spec.
I really don't see how this would affect modern computers. You know the
90%ers. <<Wintel>> Admittedly I'm no COBOL expert.
> > Now I suppose there are programmers out there so stupid, that they
> > actually hand-rolled methods they thought would save space, rather than
> > letting the machines do things in the natural binary fashion.
> >
> Look, its not the programmer, but what the OS or language interface returns
> that determines what the programmer will use.
That's not always the case. Programmers reinvent the wheel and
circumvent such structure all the time. Sometimes for good, sometimes it
goes bad. I used to do it all the time. It wasnt always neat-looking but
I was able to speed some comparison-loop-exits a lot.
> If the machine gives you
> yymmdd you're not going to convert it to anything else unless theres a
> system requirement to deal with dates more than, say, 5 years in the future
> or a lifetime in the past (payroll limit).
The question I posed initially remains-- why would they return the year
that way, since BCD saves no space?
> I've only designed one in many
> years in the business. In the history of computers this requirement has not,
> until recently, led to any requirement to consider which century a date
> falls in.
I guess I'm just having a hard time believing programmers are that
stupid-- even ones that work in Redmond. <<Or were in Boca Raton>>
> > Big talk is easy when you won't cite specifics.
> >
> Specific enough for you? I've used and understand all the systems, clocks
> and software systems I cite.
Well, no. I mean you offer a lot, but I still need those 2 basic
questions addressed (#2 is the claim that BCD is native on some processors
but that binary math is not).
I'll try to outline 2 SIMPLE clear advantages (IMO) of BCD, over Binary, for
the storage of numeric values such as dates. Will you then try to SHUT UP
about the damn thing ?. Deal ?.
If you had much more GOOD experience than you obviously have, over a wider
range of hardware platforms, compilers, database systems, etc, then you
would not have persisted with all the repeated crap here over recent days.
Many have pointed out the errors in your ways, NOBODY has supported your
claims - you're either brilliant, and all the rest of us are stupid,
or........ As one who has been involved in software (and some hardware!) for
over 30 years, including stints at compiler and OS development, much
"low-level" stuff, on hardware ranging from the smallest 4-bit
microcontrollers to the very largest mainframes/databases on this planet,
I'm annoyed at the repeated slurs from your postings.
Anyway...BCD versus binary:
1. With databases, there's usually little "math", and lots of "input" and
"output" activity. Choose a platform which supports binary and BCD. Write
some code (in assembler to minimise "cheating"), to convert a binary value
to ASCII or EBCDIC (for output), and to convert from ASCII/EBCDIC to binary.
Repeat using BCD storage. Measure the SIZE of the 8 routines, and measure
the timings of the routines. See !!. Now do you see AN advantage for BCD.
BIG advantage, eh ?.
2. Hold a Date, as YYYYMMDD or YYMMDD, as a composite BINARY value. Write
some code to extract just the YY (or just the MM digits, or just the DD)
portions - as would be needed for comparisons, sorts, validation, calcs,
index-builds, etc... Write the same functionality using BCD storage. Get
Sizes and Timings. See ???. VERY BIG advantage ?.
IMO, you need some REAL GOOD experience REAL BAD <g>.
Mike
The posting of private mail is a breach of Copyright Law in mist
civilised countries; it is also a breach of the International Copyright
Convention. Either it is irrelevant whether you omit the author's name,
or it makes the offence greater. Those whose words have been misused
are now entitled to sue you for damages.
Note also that your posts will have been stored and indexed on a number
of archiving services, as will the responses. Personnel departments of
technically competent organisations will know about this; your future
chances of obtaining a position under the name Chalupa Chupacabra are
imperilled.
It appears that you know as little about civilised behaviour as you do
about the operation of the sort of computer systems used for data
processing.
--
© John Stockton, Surrey, UK. j...@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL: http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
Dates - miscdate.htm Year 2000 - date2000.htm Critical Dates - critdate.htm
Y2k for beginners - year2000.txt UK mini-FAQ - y2k-mfaq.txt Don't Mail News
Heres what happens
In IBM and compatable PC's you have BCD representation for each of the
following (1 byte = 2 BCD digits) day, month, year, century, hour,
minute, second,
This BCD representation is inherent and must be extrapolated by the
software when you either read directly from the CMOS, or from the BIOS.
(cite: http://www.2000solved.com/y2kpcfox.cpp for an example of how
it's read and converted).
The Operating system (e.g. DOS/Windows) adds an interrupt that does the
conversion and provides day of week calculations also - so applications
can request the time from the OS and save BCD conversions.
It is this OS time that is updated every clock tick and maintained
independently of the time in the RTC chipset - it just automatically
loads the OS time when the PC first boots up.
That is why the y2k hardware problems are SO EASY to fix within
software - as not many people bothered doing BCD conversion and just
used the OS clock instead. and all the people that did convert it used
the BIOS rather than the unstandard/hard to read CMOS.
What appears criminal is that microsoft seem to refuse to fix NT to
allow certain hardware types to maintain the date correctly past y2k.
I've certainly approached them directly regarding this with little
interest.
--
* Date Doctor is a new, software-only, proactive y2k fix *
* Visit http://www.2000solved.com/ *
* First person to find a PC it can't fix wins $100 *
* We give the source to our test program - it won't lie to you!! *
Sent via Deja.com http://www.deja.com/
Before you buy.
> Note also that your posts will have been stored and indexed on a number
> of archiving services, as will the responses. Personnel departments of
> technically competent organisations will know about this; your future
> chances of obtaining a position under the name Chalupa Chupacabra are
> imperilled.
Man, do you have a stick up your butt!
BTW, I suspect that Chalupa Chupacabra is an alias!
--
Agent Sir Ed
Executive Director,
Internet Mind Control Project.
Broadcasting to Raymond's Buttocks
Since 1993
****************************************************
Join the Internet Mind Control Experiment!
Over 1,000,000 agents strong, and growing!
Call 1-888-CIA-DRIVES-RAY ext.CRAZY
****************************************************
The Internet Mind Control Project
is an Equal Opportunity Employer
We offer full benefits,
generous 402(k) pensions,
paid vacations
and generous health benefits
(Restrictions apply)
See your local CIA recruiter
****************************************************
ark...@internetcds.com (Raymond Karczewski) wrote, explaining his megalomania:
>rk: I AM a Son of God
>rk: I AM in this world, but not of it.
>rk: I AM a man of Truth, of Love.
>rk: I AM a mirror of Truth
>rk: I AM Infinite. Therefore I AM YOU and everything else that
>is NOT YOU.
>rk: I am no less of a spiritual being than Jesus was
>rk: I AM the essence of HU (God) and MAN( animal).
>rk: I AM the Infinite and the limited, rolled into ONE.
>I embody the sum total of all of the traits of humankind
>that have ever been and are yet to be known.
****************************************************
Kazoo's philosophy of life:
> rk: Die to the dead KNOWN
> rk: NEGATE, NEGATE, NEGATE!
Nuts, isn't he?
Oh well!
****************************************************
Anita Karczinski (Mrs. Kazoo):
"No, Ed. A person of integrity takes self-responsibility for
their words and actions. The immature and irresponsible person
waits until such responsibility is forced upon them by law."
Agent Sir Ed:
"[Anita]...your words 'The immature and irresponsible person
waits until such responsibility is forced upon them by law,'
are they a reference to the fact that your husband is
driving around without a license or insurance, with an
arrest warrant out for him, and when he's finally caught,
has his car seized, and goes to jail, that will be
'the law forcing responsibility' upon him?"
Oh, to be a BASSACKWARDS wannabe guru, in the throes of hypocrisy!
>On Sun, 21 Nov 1999 01:51:57 -0800, no...@nospam.com (Agent Sir Ed)
>wrote:
>>Man, do you have a stick up your b****
><above editied for firewall reasons>
>>
>But he is correct. Its only the decent thing to ask beforehand. He
>didn't I was offended and am considering some sort of action.
I have decided my course of action, I'm going to pick my nose and
flick the bogey at him.
I may just post the abuse address, but that depends on if he starts to
understand what Y2K is all about.
Rich
Ignorance is bliss and I'm a very happy person.
What do you mean? Pardon me for being dense, but I cannot make heads or
tails of this sentence!
Big advantages indeed. It takes more code to convert from ASCII
numbers to HEX than simply plugging the numbers into memory as BCD.
There's two types: packed and unpacked. RTCs use packed BCDs. Packed
means two decimal digits can be stored in a byte without conversion to
hex. unpacked means only one decimal digit is stored, and that's in
the lower 4 bits, with the high bits undefined or set as a negative.
So in a sense the unpacked BCD is actually a waste of memory compared
to packed BCD. But that's trivial -- it still saves conversion code.
MDOC7
In article <qszZ3.928$o4....@news.indigo.ie>,
And there are various ways of storing BCD - on the ASCII and EBCDIC
platforms, and depending on the CPU features - including the Packed and
Unpacked schemes you mentioned. For instance, there are different approaches
to holding "Sign" information...
- Mike
<md...@my-deja.com> wrote in message news:82nhtv$g17$1...@nnrp1.deja.com...
You still using that account? If not... I've got news for you. By now
you should know who I really am! Hint hint, we have the same name, but
don't post here <G>
mdoc7
In article <oRN34.207$J9....@news.indigo.ie>,