Results 1 to 34 of 34

Thread: Negative discriminants?

  1. #1

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Negative discriminants?

    Im starting to understand 2nd polynominals better except when the discriminant is negative. I took this equation 4x^2 + 6 + 17 = 0 and evaluated the discriminant whis came out to be negative.
    sqr(6^2 - 4 * 4 * 17) = sqr(-146) Now judging by the quardratic equation i think i set up the problem like this. -6 +/- sqr(-146) / 8.
    which i think should be. -6 +/- 12i / 8

    S={-0.75,1.5i, 0.75, 1.5i}

    Does this look at all right. Am i at least on the right track?

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Looks about right to me, but I've only been briefly introduced to complex numbers.
    Harry.

    "From one thing, know ten thousand things."

  3. #3

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Thanks Harry. Im just getting into complex numbers and it all seems odd to me. At least youve given me some indication that i am on the right path.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    i suppose you meant 4x^2 + 6x + 17 = 0

    x^2=6/4+17/4=0

    x=-6/8 +- sqr(36/64-17/4)

    x=-3/4 +- sqr(-59/16)

    x=-3/4 +- sqr(59)i/4

    x1=-3/4 + sqr(59)i/4
    x2=-3/4 - sqr(59)i/4
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    You have the right idea, but you have an arithmetic error.

    6^2 - 4*4*17 = 36 - 272
    36 - 272 = -236, not -146

    This gives [-6 +- SquareRoot( -236 ) ] / 8

    One root is -.75 + i*1.92 (approximately)

    BTW: You showed SquareRoot( -146) = =- i*12

    I hope you considered that an approximation. (12^2 = 144, not 146).
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  6. #6

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    6^2 - 4*4*17 = 36 - 272
    36 - 272 = -236, not -146
    Right. Im sorry.

    With out getting into complex numbers too deep it seems that when there is a square root of a negative number. ie.... sqr(-n)
    That an "i" is tacked onto the value. I was reading that the starting base for an imaginary number is "i" which equals sqr(-1)
    sqr(-1). So what is the actual basis for complex numbers? Are they saying that the square root of a negitive value cannot be found?

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Originally posted by Dilenger4


    Right. Im sorry.

    With out getting into complex numbers too deep it seems that when there is a square root of a negative number. ie.... sqr(-n)
    That an "i" is tacked onto the value. I was reading that the starting base for an imaginary number is "i" which equals sqr(-1)
    sqr(-1). So what is the actual basis for complex numbers? Are they saying that the square root of a negitive value cannot be found?
    the square of a negative number is not a Real number
    On the other hand Complex numbers that are so to speak two dimensional, has a real and a imaginary dimension, the square of a number will double the phase angle, reason why i^2 which has phase 90 degrees will be a real number. Euler's formula expresses this nicely:

    e^i*pi=-1
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  8. #8
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Addition, subtraction, multiplication, and division are defined for complex numbers represented by expressions like (x + iy). There are also definitions for trig, exponentional and other functions.

    The entire concept of complex numbers originated due to cosideration of simple equations like (x^2 + 1 = 0). It did not seem reasonable that such a simple equation had no solution.

    Somebody came up with the idea of i = SquareRoot( - 1). Most any symbol could be used, but i was chosen.

    Many operations on complex numbers correspond to operations on points or vectors represented by (x, y).

    Complex addition is exactly like vector addition. Complex multiplication is like rotating a vector.

    Complex numbers have a lot of applications in science and engineering as well as in pure mathematics.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  9. #9
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    i think i was choosen for i as in imaginary
    In physics, you often use j instead because i is already used for instaneous current.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  10. #10
    Hyperactive Member thinktank2's Avatar
    Join Date
    Nov 2001
    Location
    Arctic
    Posts
    272
    Originally posted by kedaman
    the square of a negative number is not a Real number
    Square root

  11. #11
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Originally posted by thinktank2


    Square root
    öoujgouahfäoöuerwhgvöahfdägiaegä
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  12. #12

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Posted by kedaman
    reason why i^2 which has phase 90 degrees will be a real number.
    Right. Ive seen examples similar to this one where everything seems to rotate in a cycle
    Code:
    i = sqr(-1)
    i^2 = i * i  = sqr(-1)*sqr(-1) = -1
    i^3 = i^2 * i = -1 * i = -i
    i^4 = i^3 * i = -i * i = -i^2 = +1
    i^5 = i4 * i = 1 * i = i and so on.......
    But everytime i evaluate a negative discriminant such as
    sqr(4^2 - 4*1*13) = sqr(-36) i come up with just an "i" tacked on.

    For instance sqr(-36) = 6i. Right?

  13. #13

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Posted by Guv
    Complex multiplication is like rotating a vector.
    Is this the type of math used in game programming?

  14. #14
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Originally posted by Dilenger4
    Is this the type of math used in game programming?
    I've not yet seen a game that uses complex numbers, but many games (well, most) use vector manipulation in some form.

    After all, a complex number is a vector, where it's in the real / imaginary plane.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  15. #15
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357

    calculators...

    Don't even try using the Complex Number mode on your calculator. My casio calculator can't even square a complex number!

    (Though to be fair, it can + and -)
    There are 10 types of people in the world - those that understand binary, and those that don't.

  16. #16
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Python has a built-in complex type, although I've never used it.
    Harry.

    "From one thing, know ten thousand things."

  17. #17
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I use the built in complex datatype in my Ti-83 all the time
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  18. #18
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    My HP48GX will do almost any operation on complex numbers: Roots, powers, trig, ordinary arithmetic, et cetera. A complex number looks like a vector.

    It works with a stack. If an operand in the stack is complex, it does complex arithmetic.

    This calculator will solve polynomials with complex roots.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  19. #19
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    so does mine, so does mine
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  20. #20
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357
    *jealousy*

    There are 10 types of people in the world - those that understand binary, and those that don't.

  21. #21

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Posted by Guv
    My HP48GX will do almost any operation on complex numbers: Roots, powers, trig, ordinary arithmetic, et cetera.
    Yeah i heard the HP Makes the best calculators. Right now im using a sharp EL-506L which comes in handy for number system
    conversions and other stuff. But maybe if im good santa claus will bring me a new HP cal.

  22. #22
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Most people who try a stack oriented calculator love them, and would never again use a regular calculator. As far as I know, HP is the only company that makes them.

    The HP 48GX has a marvelous structured programming language.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  23. #23
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Does 'stack-oriented' mean it uses reverse Polish expressions?
    Harry.

    "From one thing, know ten thousand things."

  24. #24
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Isn't RP supposed to be easier to program? (As in an interpreter/processor for it)
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  25. #25
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Well yes, because it's easy to evaluate it with a stack. With infix you have to either use 2 stacks to convert to postfix first, or an expression tree (kind of binary tree) to evaluate it.

    Well there are probably other ways but they are the easiest I know.
    Harry.

    "From one thing, know ten thousand things."

  26. #26
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    A calculator with Stack architecture is basically implementing Reverse Polish calculations, although the user is generally unaware of using Reverse Polish. I do not remember the last time (if there was a time) that I formally converted an algebraic expression to Reverse Polish prior to doing calculations. Once you have used a Stack calculator for a few calculations, you develop an intuition for how to use the Stack to evaluate formulae.

    For those not familiar with Reverse Polish and Stack architecture, the following is an explanation. BTW: If IBM had not had a remarkable marketing organization in the fifties and sixties, I believe that almost all mainframes and personal computers would have used Stack architecture.

    Stack architecture means that the CPU hardware implements a LIFO (Last In First Out) Stack. When you key in a value and use the Enter Key, the value you just keyed is on top of the stack and everything else gets pushed down one level. If an Operator or Function requires n arguments, the n arguments are used and removed. The result or results are put on top of the Stack.

    My HP 48GX maintains a Stack capable of holding at 200 or more values. I never used more, so do not know what the limit is. The four values at the top of the Stack are always displayed, and you can scroll to see other values (if any).

    To the best of my knowledge, every compiler written in the last 40 years has converted algebraic notation to Reverse Polish and generated the machine language by parsing the Reverse Polish version of expressions. When programming techniques were more primitive and computers were slow with very little memory, there were a few compilers which required Reverse Polish input to the compiler.

    There are well known published algorithms available for converting to Reverse Polish. If the CPU does not have stack architecture, the compiler creates a virtual (or software implemented) Stack.

    The following are some examples of Polish notation.
    • A B + is Reverse Polish for A + B. + A B is ordinary Polish, which is hardly ever used.
    • A B C + * is Reverse Polish for A*(B + C). B C + A* would result from converting (B + C)*A
    • X Y + U V + * is Reverse Polish for (X + Y)*(U + V)
    The general algorithm for using a Stack calculator is to enter values in order, using an operation key whenever possible. When I see A*(B + C), my thought processes go as follows.
    • Key in value for A, but cannot do an operation yet: Hit the Enter Key, putting A on the Stack.
    • Key in value of B: No operation possible, use Enter Key.
    • Key in value of C: Can do the Add, use the add button.
    • Now can multiply, use the Multiply button. Result is on top of Stack.
    Aside from the keystrokes for variable values, there were 4 keystrokes (Enter Key twice, + *). This is less than what is required if you enter full algebraic notation.

    An experienced user of one of the better algebraic calculators uses about the same number of keystrokes, because she/he interprets the notation and does not enter parentheses. When the user of an algebraic calculator avoids keying the parentheses, he is actually doing a partial conversion to Polish notation. The algebraic calculators I have used required a thoughtful translation or the use of memory addresses due to the lack of a Stack. A*(B + C) was not easy to do as A B C + *. For most calculators, it is easier to do B C + A *.

    Evaluating a polynomial is an interesting example of a Stack calculation. When evaluating a polynomial for many values of the variable, I use a built in function which allows me to enter the coefficients once only. If evaluating for one value of the variable, I would use stack calculations instead of the built in function. Consider a third order polynomial, which should be evaluated as the following.

    [(Ax +B)*x + C]*X + D, not as (Ax^3 + Bx^2 + Cx +D).

    The recommended calculation is easier to program in a language like VB or C and results in better precision for some polynomials. The Stack calculation would be as follows.
    • Key in the value of x. Use the Enter Key three times to make three copies of x in the Stack.
    • Key in value of A & use the * button.
    • Key value of B & use the +, then the * button.
    • Key value of C & use the + then the * button
    • Key in value of D & use the + button.
    Aside from strokes used to enter the coefficients and the variable values, the above requires 9 keystrokes. This seems fairly easy to me.

    BTW: I wonder how many keystrokes a good algebaric calculator would require. I remember a calculator with memory for one variable which could do the above in about the same number of keystrokes. Calculators with more memory tend to require more keystrokes. The calculator with memory for only one variable had specific keys to recall the value. A calculator with more memory requires extra keystrokes to specify which value is to be used. Extra capability results in extra complexity.

    It reminds me of my father telling me about simple and complicated machines. A machine which can do one function is easy to use: Turn it on and it does its thing. If a machine can do two things, you must turn it on and push one of two buttons or set a switch for thing one or thing two. If you have a machine which can do 10,000 functions, you might have trouble figuring out how to get it to do anything. In fact, such a machine is a computer without an operating system.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  27. #27
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    I didn't realise most computers weren't stack-based. Is this a RISC vs CISC thing? The only assembly I have ever written was some JVM code, which is pretty simple, and I remember pushing values onto the stack before doing parameterless operations on them.
    Harry.

    "From one thing, know ten thousand things."

  28. #28
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    The Burroughs Corporation, now Unisys (I think) made mainframes with Stack architecture and used Algol as the programming language. I do not believe there were assemblers implemented for that system because Algol on a Stack CPU could produce code as efficient as that possible with an assembler.

    They even wrote the OS in an Algol Dialect which included syntax for controlling interrupts and other functions required by an OS. The orignal Burroughs Corporation were the first true professionals in CPU architecture, programming, and Compiler design.

    For example: While somebody in the academic community might have done it first, Burroughs was the first commercial organization to implement a major compiler in its own language, which is the correct way to do it. You bootstrap your way by implementing the most basic syntax and using a clerical staff to do compile the initial version of the compiler into machine code. With the first version you start implementing the more sophisticated syntax.

    There probably were other Stack architecture mainframes, but none by a major manufacturer.

    I do not know what the MAC & Intel architecture is like. Since I have never seen any mention of their using Stack architecture, I assumed that they did not. If neither of those use Stack architecture, there is hardly any mainstream PC that uses it. I have seen several compilers which provide a Stack to the user, but it is usually a virtual Stack supported by compiler generated software. I am pretty sure that VB uses a Stack to implement nested and recursive Subroutine (& Function) calls, but I have always assumed that it was a virtual stack.

    RISC is not applicable here. You can implement RISC or CISC on most any basic architecture.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  29. #29
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Thanks for all the info Guv. I'm not really clear on exactly what the alternative to a stack-based architectur is, though. I (apparently wrongly) thought that all CPUs had several small built-in stacks used for saving the state of the registers when an interrupt is received.

    So, if this is not the case, what is the alternative?

    It seems my shaky knowledge of CPU architecture doesn't distinguish between the physical and the virtual properly.
    Harry.

    "From one thing, know ten thousand things."

  30. #30

  31. #31
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    Stack architecture refers to registers used for implementing arithmetic, not to registers used to hold addresses.

    At the machine language level, a Stack architecture CPU adds using commands like the following.

    Load A: Contents of memory A to top of stack.
    Load B:
    Load C:
    Add: Add top two stack items, replacing them with the sum.
    Add
    Store D: Store top Item in location D, without changing stack.
    Pop D: Store top item in location D, discarding it from stack.

    Operations which put items on the stack push others items (if any) down. Operations (like Add) which remove items, pop other items (if any) up.

    A Register architecture CPU adds using commands like.

    Load A: Contents of memory A to accumulator.
    Add B: Add contents of memory B to accumulator.
    Add C
    Store D: Store accumulator in memory D, without clearing.
    StoreClear D: Ditto, clearing accumulator.

    A Stack CPU might have a stack limited to 3 or 4 registers, losing the oldest item if capacity is exceeded. In most instances, the top 3-4 stack items are held in registers and an address register is used to implement the storage/retrieval of additional items to/from memory.

    A register CPU typically has 3-16 or more registers in the arithmetic unit, some or all of which can be used as accumulators. In some systems, the arithmetic unit registers can also be used as address registers.

    A stack CPU almost always has variable length commands, since many commands do not require an address. A register CPU usually has fixed length commands.

    At the machine language level, most systems generate a double length product, using two registers. An assembly language programmer has access to the low order part of a product, being able to store it in memory or perform other operations with it. A CPU almost always allows the use of a double length dividend, with the low order part usually being replaced by the quotient, and the high order part usually being replaced by a remainder accessible to the programmer. Users of a compiler do not typically have access to the lower order part of a product and cannot use double length dividends or access remainders after a division.

    The previous paragraph relates to integer arithmetic. Floating point operations are usually performed in a separate arithmetic unit. Because of this, there are CPU's which cannot perform a Mod operation for floating point numbers.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  32. #32
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Ahh, I see the distinction now, thanks Guv

    I think my idea of what exactly makes a CPU RISC or CISC may be a little off. I associate what you've described as a stack architecture with RISC, and the register architecture with CISC. What's the actual difference?
    Harry.

    "From one thing, know ten thousand things."

  33. #33
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151
    I am not entirely sure about RISC & CISC.

    It was my understanding that RISC uses only simple machine languages commands, while CISC uses relatively complex ones.

    I have heard claims that RISC uses very few machine language commands while CISC uses many, but this is not what the terms meant long ago when the concepts first fought each other.

    In the middle to late fifites there were some CISC-like systems with relatively few machine language commands, some of which were very complex (for example an array sort command or a binary to decimal conversion command). Many of the CISC systems had 3-address commands (An add command had the address of each operand and an address for the result).

    The RISC-like systems of that era had many (over 200 very simple commands), and usually had a Repeat Command allowing 1-4 commands to be held in fast access registers and repeated. All of these RISC systems used single address commands. The RISC systems, for example had every shift command you could think of applicable to both single & double length registers: Left & right (losing bits), left & right circular, left & right algebraic. They did not have any command as complicated as a memory to memory move instruction. A memory to memory move was implemented by loading a register with one byte, a half word, or a full word (48 bits) from memory and then storing one byte, a half word, or a full word from the register to memory.

    At first glance, the RISC memory to memory move seems clumsy and perhaps slower than a built-in machine language move command. With a repeat order in control of fetch & store commands, the RISC method was every bit as fast. The commands were held in fast access registers and the repeat command bumped addresses as required for each fetch & store. The advantage came when a programmer or compiler could decide to move single bytes, half words (3 times as fast), or full words (6 times as fast). The CISC CPU had to have 3 built in move instructions to get this flexability, and many CISC systems only had the slower byute move built in (it could do the half word & words moves, but was slower doing them). The programmer or compiler could easily program the move to reverse the order of the data by having the fetch address incremented and the store address decremented. The programmer or compiler could also use a byte (or half word) fetch and a word store or vice versa, allowing for all kinds of formatting, parsing, et cetera.

    The smarter designers soon realized that the RISC approach was far superior. A clever programmer (or sophistcated compiler) could effectively create a huge number of CISC-like commands using the huge number of permutations possible with 200+ simple commands, while the CISC system had far fewer built in instructions. The RISC CPU could effectively be programmed to do all the CICS commands, usually implementing them as fast as could be done on the CISC CPU. When the CISC CPU did not have an appropriate command for a given purpose, the code became clumsy and slow. The RISC CPU in a sense had thousands of useful CISC commands invented on the spot as required by programmers and compiler writers, while the CISC CPU had at most hundreds of commands.

    The CISC system really suffered because it could not afford the circuitry or firmware to implement every possible simple instruction (for example they typically only had a few basic shift commands). The better RISC systems were faster and easier to program, mainly due to the versatility of the RISC approach to machine language commands. A compiler on a RISC system tended to generate much faster and more compact code than a compiler on a CISC system.

    BTW: A RISC CPU can convert binary to decimal in about 2-4 commands under control of a repeat command, and does it about as fast as a single CISC command. It uses a different
    set of about 2-4 commands for integer and fractional conversion. Some of the CISC systems only had integer conversion commands: It was slightly awkward and slow doing conversion of fractional binary.

    The RISC systems were unsuccessful because IBM had a tremendous marketing edge. They had almost 100% of the Punched card machine market. The users of this equipment constituted 80-90% of the potential buyers of the large expensive mainframes of that era. They were used to dealing with IBM and trusted IBM, not knowing that other companies were building superior computers. In the early sixties, IBM started marketing systems (the 360 series) which were a compromise between RISC & CISC, with a tendency toward being CISC.

    They sold so many systems that every one had to be compatible with their architecture. There were large numbers of programmers trained to use the 360 Series mainframes and huge amounts of code which ran on those systems. If you went the IBM way, you had a ready supply of programmers (scarce item in those days) and lots of applications software already available. RCA & other companies actually built 360-compatible mainframes in order to stay in the game. DEC & others settled for small niche markets.

    At one time, there were almost 20 mainframe manufacturers. By the late seventies, I think there were only 3 or 4, including Cray which designed the fastest number crunchers for a special market (I think they were secretly financed by the CIA or NSA, and only pretended to produce systems for the commercial market).

    When the PC came along, there was a tendency to use machine language commands similar to those used in the 360 series and its successors.

    The IBM marketing capability had unfortuante unintended consequences. In terms of technical excellence, it set the computer industry back. Due to the incredible advances in hardware capacity and speed, it was never really necessary to design the best systems. I am sorry it turned out that way.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  34. #34
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Sounds a bit like modern-day Microsoft. The power of their marketing does them a lot of good and the industry a not inconsiderable amount of harm.

    Oh well, that's life in competitive industries.
    Harry.

    "From one thing, know ten thousand things."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width