text:
Talk:Haskell/Next steps

First of all, I'm just a reader learning Haskell, but I do have previous experience with other languages. In reference to the fix me, I do not see how lists could be introduced without some mentioning types, as it appears you need to designate the type when creating a list. For this reason, it might be better to either present types earlier, or present lists later. 70.105.36.254 16:01, 9 July 2006 (UTC)

 * Please take a look at Haskell/List basics and let us know what you think. Thanks, -- Kowey 23:58, 10 July 2006 (UTC)

Which Problem ?
you write :

Let Bindings

Often we wish to provide local declarations for use in our functions. For instance, if you remember back to your grade school mathematics courses, the following equation is used to find the roots (zeros) of a polynomial of the form ax2 + bx + c = 0: x = (-b \pm \sqrt{b^2-4ac}) / 2a. We could write the following function to compute the two values of x:

roots a b c = ((-b + sqrt(b*b - 4*a*c)) / (2*a),    (-b - sqrt(b*b - 4*a*c)) / (2*a))

To remedy this problem ...

Which problem ? The returning of 2 Values ?

 * I have added some extra text to (hopefully) make it a little clearer. Thanks! The text:
 * Notice that our definition here has a bit of redundancy. It is not quite as nice as the mathematical definition because we have needlessly repeated the code for sqrt(b*b - 4*a*c). To remedy this problem, Haskell allows for local bindings -- Kowey 09:52, 13 February 2007 (UTC)

Compiling With GHC
"GHC can also be used as a compiler. That is, you could use GHC to convert your Haskell files into a program that can then be run without running the interpreter. See the documentation for details."

I assume that GHC best practices will be covered in later chapters, but a link the correct section of the GHC documentation (perhaps intended for beginners) would be more useful than "See the documentation...". Abdelazer 23:59, 31 May 2007 (UTC)

In order to compile your .hs file into an executable program, do the following (in Windows):
 * I believe it will be extremely useful for absolute n00bers like me (who literally spent hours trying to make sense of the compiling instructions), the following piece of information:
 * 1) Open the cmd prompt and navigate to the directory where your file is: cd C:\test\haskell
 * 2) Compile: C:\ghc\ghc-6.8.2\bin\ghc --make filename.hs

Actually it also works with ghc --make filename (without the .hs extention) ; ghc --make filename.hs -o filename.exe, etc.

Distinguish Between GHCi Commands and Haskell?
"Now change into the directory where you saved your file, open up ghci, and use :load (or :l for short):"

Perhaps a Note could be added that would make it clear the distinction between Haskell syntax and GHCi commands (prefixed by ':')? Something like this:

Abdelazer 00:09, 1 June 2007 (UTC)

Magic
Here, the order is important. If we had put the last line first, it would have matched every argument, and f would return -1, regardless of its argument (most compilers will warn you about this, though, saying something about overlapping patterns).

The  (underscore) character has not been defined for pattern matching yet. Text should be added to describe use of  as the wildcard character. Something like this:

"In this example, the order is important because serves as a wildcard character for pattern matching (it matches everything). If we had put the last line first,   would have matched every argument, and the function   would always return $-1$, regardless of its argument. Most compilers will warn you about this, though, saying something about overlapping patterns." Abdelazer 00:25, 1 June 2007 (UTC)

Prelude Pointer Too Soon?
"It would probably be wise to take a little time-out to look at some of the functions that are defined in the Prelude. Undoubtedly, at some point, you will accidentally rewrite some already-existing function (I've done it more times than I can count), but if we can keep this to a minimum, that would save a lot of time."

The reader has not been introduced to the term "Prelude" yet, so some introductory text would be useful (perhaps a clarification of: "The Haskell Prelude contains predefined classes, types, and functions that are implicitly imported into every Haskell program.". Additionally, the Prelude should be linked rather than just referenced in plain text. Finally, I think this whole Prelude discussion should probably be moved to later in the text, as the Prelude syntax is too complex for a beginner at this stage.

I also thought that observation was a bit weirdly placed, so I rephrased it and included the link. --Duplode (talk) 03:21, 29 April 2010 (UTC)

math tags
I think that tags are overused here.

Putting them on plain numbers is a bit too much, for example in the case section. --Amir E. Aharoni 20:11, 8 June 2007 (UTC)

Boy, I agree! Actually, I'm one of those people that will only put math tags on displayed material, never (almost) on inline material. If it needs a math tag, then it should probably be displayed. —Toby Bartels (talk) 15:18, 22 October 2008 (UTC)

Test module?
When the if statement is introduced, the prompt mysteriously changes to Test> and there is a statement like

"If Test is the current module..."

I assume that the concept of module in Haskell is something which will be coming up, but right now it's mysterious, at least to me.

 * Thanks for pointing that out. Such are the dangers of careless remixing (the section was lifted from Haskell/YAHT, which briefly mentions modules in the right place.  I have taken out all references to modules -- Kowey 09:02, 30 June 2007 (UTC)

Does order matter?
In Section 1.3, you say that order doesn't matter. Then in Section 2.3, you say that order is important. Which is it? (I fear that Section 2.3 is correct, and wonder what Section 1.3 is really trying to say.) —Toby Bartels (talk) 15:24, 22 October 2008 (UTC)

 * Order doesn't matter for declarations (i.e. first  then   or the other way round) but it does matter for pattern matching (i.e. first the case   and then   or the other way round). That seems to be what section 1.3 and 2.3 want to say.
 * -- apfeλmus 08:35, 23 October 2008 (UTC)

 * Thanks Apfelmus, that sounds plausible (especially now that I've read further about pattern matching). I hope that somebody knows for sure and will update (at least) Section 1.3. —Toby Bartels (talk) 01:48, 25 October 2008 (UTC)

Hehe
I just finished watching the A Taste of Haskell talk for oscon 07 and decided to check out the wikibook

I saw this line
 * The interpreter is indeed a useful tool

And grinned. That's Simon Peyton-Jones's voice, I recognize it! Maybe? The diff's username doesn't look promising 96.239.136.119 (talk) 01:38, 20 September 2009 (UTC)

 * Haha, I don't think SPJ is editing the wikibook, but he has written other tutorials like Tackling the Awkward Squad : monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell or A Tutorial on Parallel and Concurrent Programming in Haskell.
 * -- apfeλmus 07:37, 20 September 2009 (UTC)

Pattern matching is mentioned too soon again
In the guidelines for contributors, it seemed clear that concepts shouldn't be mentioned before they are explained. Why do we have pattern matching here, then? The case statement can wait until then. --Digichoron (discuss • contribs) 20:06, 4 April 2011 (UTC)

Nested if constructs?
This book is intended for readers of all levels of programming background, and they might not know about nested if constructs yet, or when they are used. However, the section on the case construct mentions that the case construct solves the problems that nested if constructs can solve more easily. Even if the section on the case construct is not going to be moved (see the last section, which I added), nested ifs should be shown first. --Digichoron (discuss • contribs) 00:04, 5 April 2011 (UTC)

On the Indentation section
There is a page in a later part of the book that explains this more thoroughly that would be more appropriately put around this page as it does not appear to require any detailed knowledge that has not been covered.

This page should be renamed, reorganized, and/or rewritten
I do not understand how "Next steps" summarizes the contents of this page. I recommend that this page is reorganized so that it flows better and complies with the Haskell/Notes_for_contributors page. Is this being covered by the "reorganization" of the beginners' track? --Digichoron (discuss • contribs) 00:18, 5 April 2011 (UTC)

Also, it seems to assume a lot of prior knowledge of Haskell (such as partial application) that should be replaced with simpler examples. --Digichoron (discuss • contribs) 00:27, 5 April 2011 (UTC)

 * Yup, it's not particularly well organized at the moment. Which is not surprising, this book was written by volunteers :-). Your recent contributions are most welcome.
 * --apfeλmus 08:04, 6 April 2011 (UTC)

 * Why not call the page "Conditionals and Pattern Matching", and move the last part on "let" to the "Variables and functions" section next to "where" since these two are close.
 * --Fritzicato (discuss • contribs) 22:23, 27 December 2020 (UTC)

Let Bindings chapter could add an explanation when to use let vs. where
In a previous section the "where" clause was already introduced. In this chapter/module the "Let bindings" sections introduces the "let/in" keywords. I think it would be appropriate to hint to the already introduced "where" clause and maybe explain how it is different from "let/in".

2012-04-01 reorganization
I just finished a long overdue cleanup of this chapter, so that it doesn't stick like a sore thumb on the "new" structure of the early chapters. The major changes were:

 * Removed the section about case expressions, leaving just if expressions and piece-wise definitions (which have more immediate applications in the following few chapters and are arguably easier to explain at this stage). case is now much further ahead, on the "Control structures" chapter - which, in turn, now has a definite reason to exist!

 * Pruned _ from the piece-wise example, as without case expressions it becomes an unnecessary distraction until we tackle recursion two chapters ahead.

 * Removed most of the indentation section, leaving just a warning and a forward pointer incorporated to the let section.

 * Removed the half of the composition section which discussed (.) and moved it to the "More on functions" chapter. The other half is not essential either, but it is a quite simple point which serves as a good pretext to leave the note on Prelude here (at least while the "Building vocabulary" chapter still does not exist).

 * Condensed the let section a bit so that it plays better alongside the where presentation and examples in previous modules.

That covers most of the suggestions by Digichoron and Reirob. Note that I still couldn't think of a sane title for the chapter, nor an adequate lead text, and that there is still a strong case for eventually dismantling it completely and dispersing the contents throughout the book. But hopefully it is at least tolerable in its current form. Duplode (discuss • contribs) 08:07, 1 April 2012 (UTC)

Next step of reorganization
This chapter has just gained a lifeline. By combining Apfelmus' plans from 2010 on how to introduce pattern matching in the Basics with my own feelings about the matter, I expanded the "Piece-wise definitions" to a real introduction about pattern matching. A few extra comments: --Duplode (discuss • contribs) 06:16, 5 April 2012 (UTC)
 * No mention was made of pattern matching on lists or tuples, on the grounds that it would be too much to take and there would not be good examples easy at reach. It is better to introduce (x:xs) and such right in the middle of the Recursion chapter, as it is now (I will just rework that a bit to weed out redundancies).
 * I opted to leave that subtle mistake in the third example and then immediately ask readers to find it through an exercise because I felt it would be more fun that way. Feel free to change that if you feel this kind of didactic strategy is too risky.
 * As for the remainder of the chapter, I guess most of it will eventually be moved away. let bindings can go to "More on functions" as soon as we ensure there are no examples relying on let...in in the intervening chapters; and function composition should be moved to "Building a vocabulary" when that comes into being (I am starting to see a way to pull it off even while we don't have cheat sheets or an ample assortment of exercises). I believe that if/then/else can stay here, though: it is a small section, the construct is easy to understand and is convenient to mention it here so that we can keep the examples in Simple IO. Additionally, I would like to retain the first example in the pattern matching for shock value :-D
 * If the chapter is not going to be just about pattern matching, however, that means we still lack a good name. Maybe it can stay as "Next steps" for the moment :)

 * Note that since then I changed my mind and brought (x:xs) here. --Duplode (discuss • contribs) 21:56, 15 April 2012 (UTC)

Samples/Excercise
Since I find the exercises very insightful, especially for beginners I am curious for the guards a combination with lists. e.g. if the very first element (head) of a list is 1 then return the last elements, while if it is 0 then return an empty list. With given case [2,5,19] and call with cons. Or something like this, perhaps a little bit more elaborated sample ;) but anyway to show how list would cause at the very beginning I have had my troubles with 'How to return a list (resp. elements of it)?'

AND the side-note: The exercise would be great just before Tuple and list patterns cause then little bit thinking how it should work is done in advance for the solution details just refer to the text.

 * The first suggestion could become a nice exercise, though I'd probably use some other condition rather than equality (as equality tests on the head of a list are better done with pattern matching). This chapter could do with a few more exercises. Duplode (discuss • contribs) 05:10, 13 April 2014 (UTC)

let bindings
Question: From the text it is not really clear what is the difference to the  statement. Is this just synthetic sugar or is there some real benefit? Cause I guess the  binding could be written as well as   binding (for the quadratic solution).

 * They serve the same purpose; as for the differences, broadly speaking,  can be easier to read than , but   can be used in more places. These differences are covered in Haskell/More on functions. By the way, the main reason   is mentioned in this chapter is to provide context for presenting   within   blocks in Haskell/Simple input and output - one of the cases in which   is not enough. Duplode (discuss • contribs) 05:21, 13 April 2014 (UTC)

title: Talk:Haskell/Next steps


text:
Conlang/Beginner

The Beginner level of this book is designed to allow students with no prior knowledge of conlanging or linguistics to readily create their own language that isn't a relex of English (nor of any other existing language). It introduces you to the fundamentals of constructing languages, and aims to keep technical terminology to a bare minimum.

What's in this level?
Each section is designed to cover the basic principles of a different aspect of languages, both natural and constructed. The sections are:
 * Sounds: This section describes the role of sounds within language. If you only speak English, you may be surprised to learn what sounds are common in other languages!
 * Words: Words are formed in many different ways around the world; this section will begin to explore those different methods.
 * Grammar: This section shows how word order or words themselves are changed to show meaning. After all, a collection of words is not a language!
 * Context: People don't always say what they mean. This section helps you think about how your language is used.
 * Writing: Almost all languages have a visual representation, known as writing. Many conlangers invent elaborate writing systems before they even begin work on the language itself.
 * Learning Your Conlang: Describes basic techniques to gain fluency in your conlang.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Conlang/Beginner


text:
Character Creation/Little details

Details are very important in character creation, they could make or break your character! There won't be tips on little details, since there can be so many, but there will be one thing: When planning details, be careful, they will change your character a lot!

For example, a reader can tell that a character is impatient if she taps her feet from time to time.

It is especially important for the characters to have little details as this makes the reader able to relate to them more. Let's take the antagonist for instance, say he's a mean, nasty, bloodthirsty man, that's alright but what makes him special? What makes him stand out in the sea of all other such people?

Maybe it's his love for roses or unrequited love from someone he has been chasing after or ability to create criminally beautiful art.

If we have a protagonist whom you've thoroughly ascertained is no Mary Sue, how do we give them a personal feel, it must be something that readers can relate to; perhaps he's reckless or likes to hang his coat on the third peg or only drinks a certain brand of tea.

As said above, little details can make or break a character however, do be sure not to overload your characters. Think of ordinary people then apply that to your works.

title: Character Creation/Little details


text:
Asymptote/Command/Math/Intersect

real intersect(triple P, triple Q, triple n, triple Z);

Return the intersection time of the extension of the line segment PQ with the plane perpendicular to n and passing through Z

title: Asymptote/Command/Math/Intersect


text:
User:Mr. C.C.

Fishhead2100 aka Mr. C.C. is no stranger to Wikipedia. He has done various edits and page starts on the main Wikipedia. More on him in due time or by going to his Wikipedia page by clicking here.

Categories

 * Slow cooker recipes

Bread

 * Herb Bubble Bread

Side Vegetable

 * Glazed Sweet Potatoes

Appetizers & Snacks

 * Potato Skins

Casseroles

 * Hasbrown Casserole

Cookies

 * Chocolate Chip Cookies (Vegan)

Garlic

 * Garlic salt

Favorite links

 * Bored.com
 * Corner Gas official site
 * Homestarrunner.com
 * Unofficial Thunder Arcade support forums
 * Snopes.com- Urban legends reference site
 * Weebls-Stuff.com
 * Wicked-Wrestling.com Forums

title: User:Mr. C.C.


text:
User talk:KyrreKA

It looks as if you're already an accomplished Mathematics student with more background than myself (I saw your name on the Wikiversity Participant's list), but if you know of anyone/are interested yourself in a Calculus class I'm trying out the intructor thing at Wikiversity, leave something on my discussion board. Fephisto 22:26, 9 July 2006 (UTC)

title: User talk:KyrreKA


text:
User talk:Ransomw

I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:28, 9 July 2006 (UTC)

title: User talk:Ransomw


text:
User talk:Loktai

Wikiversity Mathematics
I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:29, 9 July 2006 (UTC)

RetroMUD and scholarliness
Hey there, I found you googling 'retromud' and 'wiki'. As great as the guides for the game are, I always thought a wiki would be a great idea for it, to add personal insights and stuff. So far I have only found forums. I just started a new char on it since my old were deleted, and will probably read a while before I decide. I spend a lot of time reading, e-books or live ones from the library or otherwise. Any in particular you're interested in studying? Let's mail, tyciol@hotmail.com is mine since I don't come here too often. Tyciol 16:56, 10 July 2006 (UTC)

title: User talk:Loktai


text:
User talk:Atheistx

I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:29, 9 July 2006 (UTC)

title: User talk:Atheistx


text:
User talk:Scud43

I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:30, 9 July 2006 (UTC)

title: User talk:Scud43


text:
User talk:Kuang Eleven

I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:30, 9 July 2006 (UTC)

title: User talk:Kuang Eleven


text:
User talk:Inquiring Mind

I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:33, 9 July 2006 (UTC)

title: User talk:Inquiring Mind


text:
User talk:Chlewey

I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:35, 9 July 2006 (UTC)

title: User talk:Chlewey


text: Category:Book:Circuit Theory/Stubs

title: Category:Book:Circuit Theory/Stubs


text:
User talk:Paulgiron~enwikibooks

I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:36, 9 July 2006 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called Paulgiron. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Paulgiron~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:33, 17 March 2015 (UTC)

Renamed
 This account has been renamed as part of single-user login finalisation. If you own this account you can |log in using your previous username and password for more information. If you do not like this account's new name, you can choose your own using this form after logging in: . -- Keegan (WMF) (talk) 05:21, 19 April 2015 (UTC)

title: User talk:Paulgiron~enwikibooks


text: Category:Book:Digital Circuits/Stubs

title: Category:Book:Digital Circuits/Stubs


text:
User talk:Teemu

I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:43, 9 July 2006 (UTC)

title: User talk:Teemu


text:
User talk:Nbx909

I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:43, 9 July 2006 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called Nbx909. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Nbx909~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:32, 17 March 2015 (UTC)

title: User talk:Nbx909


text: Category:Book:Communication Systems/Stubs


text: Category:Book:Embedded Systems/Stubs

title: Category:Book:Embedded Systems/Stubs


text:
Category:Book:Reverse Engineering/Stubs

This category is for  stubs only, all others will be deleted from the category; to add use Reverse Engineering/Stub.

title: Category:Book:Reverse Engineering/Stubs


text:
User talk:TimMartin~enwikibooks

I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:52, 9 July 2006 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called TimMartin. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name TimMartin~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:50, 17 March 2015 (UTC)

Renamed
 This account has been renamed as part of single-user login finalisation. If you own this account you can |log in using your previous username and password for more information. If you do not like this account's new name, you can choose your own using this form after logging in: . -- Keegan (WMF) (talk) 05:36, 19 April 2015 (UTC)

title: User talk:TimMartin~enwikibooks


text:
Category:Book:Calculus/Stubs

These may either be an entire module or a section that needs attention and expansion. To place a module on this list, put Calculus Stub on the page in the appropriate section.

title: Category:Book:Calculus/Stubs


text:
User talk:Dashmon

I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:53, 9 July 2006 (UTC)

title: User talk:Dashmon


text:
User talk:Tex~enwikibooks

I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:53, 9 July 2006 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called Tex. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Tex~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:49, 17 March 2015 (UTC)

Renamed
 This account has been renamed as part of single-user login finalisation. If you own this account you can |log in using your previous username and password for more information. If you do not like this account's new name, you can choose your own using this form after logging in: . -- Keegan (WMF) (talk) 05:35, 19 April 2015 (UTC)

title: User talk:Tex~enwikibooks


text:
User talk:Boredindenton

Wikiversity
I saw your name on the Wikiversity participant's list, you may be very experienced in mathematics already, but I'm trying out instructing a Calculus course if you're interested, go to Wikiveristy, check out the mathematics department, pure mathematics, and in the course list is included Calculus. Fephisto 22:55, 9 July 2006 (UTC)

title: User talk:Boredindenton


text:
Category:Book:Modern Physics/Stubs

Pages are added to this category through the use of the ModernPhysicsStub template.

title: Category:Book:Modern Physics/Stubs


text: Category:Book:Analog and Digital Conversion


text:
Category:Book:Analog and Digital Conversion/Stubs

The ADC Stub template automatically adds pages to this category.


text:
Template:ADC Page

 Analog and Digital Conversion /Templates

title: Template:ADC Page


text:
Template:ADC Stub

''This section of the Analog and Digital Conversion wikibook is a stub. You can help by expanding this section. '' /Stubs :This template adds page to /Stubs. /Templates

title: Template:ADC Stub


text:
Analog and Digital Conversion/Non-Uniform Quantization

non uniform

Consider the situation where we have an analog voice signal. This voice signal tends to stay within certain amplitude limits, although on occasion there are some high-amplitude moments. We can say, for instance, that most of the analog signal is between 0V and 5V, although on occasion the signal can get as high as 20V. It would seem that we want to spend more of our resources in the bottom quarter of our range, and not worry so much about the upper parts of the range.

If our sampler has a resolution of 5 bits (32 levels), then a full 3/4ths, (24) of our levels are essentially a waste of space! Now, what if there was a way to "spend" more of our levels, and use more of our bits, between 0V and 5V, and not spend many levels at all on the upper 15V of our range. There is a way to do this, and it's called Non-Uniform Quantization.

μ Transform
The μ Transform (or "Mu Transform") is a method of non-uniform quantization. This transform takes certain parameters, and can produce a non-uniform quantizer, to meet specific needs.


text:
Talk:Analog and Digital Conversion

I've created a number of templates and categories for use with this book:

 * Template:ADC Page
 * Template:ADC Stub
 * :
 * /Stubs

--Whiteknight (talk) (projects) 01:29, 10 July 2006 (UTC)

Quantity Symbol Standardization
Not only on this page, but starting with "The Ideal Sampler", I notice that the symbol for time is given as a capitalized 'T'. The Institution of Engineering and Technology has published a "Units and Symbols" chart with standardized quantity symbols for electrotechnics. In their publication and in my personal experience, a capitalized 'T' refers to the period of a waveform, while a lowercase 't' is used to represent time.

I would like to standardize the quantity symbols across the entire book, so that would involve changing all 'time' quantity symbols from 'T' to 't'. Additionally, other symbols would be standardized such as 'bandwidth' changing from 'W' to 'B'. My aim is to ensure clarity throughout the entire book in a way that conforms to an established standard.

Are there any thoughts, objections, or alternative standards to reference to? William Leismer (discuss • contribs) 18:21, 20 December 2022 (UTC)

Possible Sections
These sections are proposed to be added to this book, depending on the level of contributions from the community. Without additional contributions, there won't be enough manpower to add these sections to this book. --Whiteknight (talk) (projects) 12:15, 10 July 2006 (UTC)

Section W: Building Converters
This section will talk about the specific process of converting from analog to digital, including how to physically construct an ADC.

This section will talk about the specific process of converting from digital to analog, including how to physically construct a DAC

Resources
I am going to list here some resources that may be of use in creating this book. There are a number of categories and images at commons, for instance, that can be harvested for use here. --Whiteknight (talk) (projects) 15:58, 10 July 2006 (UTC)

 * Signal
 * Signal processing
 * Aliasing

title: Talk:Analog and Digital Conversion


text:
Analog and Digital Conversion/Introduction

What This Book is About
Nearly every piece of electronics in use today makes some use of an analog-to-digital or digital-to-analog converter. Because of the prevalence of these types of data conversions, it is important for people to understand the limitations and drawbacks of these processes. This book will discuss the conversion process (analog-to-digital and digital-to-analog), the mathematical models of signal conversion, some topics related specifically to these processes (quantization, companding, delta modulation, etc.), and the physical electrical hardware that makes the conversions happen.

Who This Book is For
Because of the subject nature of this book, it is intended for people with a strong background in electric circuits, such as electrical engineers, or dedicated hobbyists. Readers should have at least some prior knowledge of electrical circuits, before attempting to read and understand this book. Also, some chapters discuss frequency domain effects, so a prior reading of Signals and Systems or Communication Systems (or both) would be beneficial when reading those particular sections. The mathematics in this book will not be particularly difficult; the reader should have a strong understanding of algebra, but does not necessarily need to have a background in calculus or higher maths.

How This Book is Structured
This book attempts to be organized in a linear way. Analog and Digital signals are introduced, discussed, and contrasted in the first section. Also in the first section, the sampling and reconstruction processes are introduced and described. The second section deals specifically with the process of sampling, including some important aspects of sampling (quantization, bit rate, resolution, etc.). The third section describes common data transmission methods of ADC converters, such as delta modulation. The fourth section will deal with the reconstruction process, and the effects of signal reconstruction. Finally, the fifth section will discuss some additional topics relating to signal quantization.

Additional sections may be included later, depending on the level of contributions from the community. For more information about this, see the note on the main talk page.

Where to Go From Here
Once the process of analog and digital conversion is understood, there are a number of other books that will discuss the use of analog and digital signals in more detail.

To learn more about the transmission of analog and digital signals, see Communication Systems.

To learn more about the manipulation and use of digital signals, see Digital Signal Processing.

To learn more about the use of analog and digital signals to control processes, see Control Systems.

Additional books about related topics may be added to Wikibooks in the future.


text:
Analog and Digital Conversion/Analog vs Digital

Signals
What is a "signal", exactly? A signal in the sense that we will be considering in this book is changing value of electric voltage or current through a transmission medium. There are two general types of signals: periodic and aperiodic. Periodic signals repeat themselves after a certain period of time—after they have cycled through one period, following periods don't contain any new information. Aperiodic signals, on the other hand, don't repeat themselves, and therefore can contain information. Signals also can be analog or digital signals, and we will discuss them both below.

Analog
Analog signals equate levels of electric voltage or current to amounts of information by applying some rule. Consider for instance, an analog clock, where the passage of time is displayed as the motion of the clock hands. In electric signals, a certain amount of voltage corresponds directly to a measured physical phenomenon. For instance, on an accelerometer, the amount of acceleration, measured in g's will correspond directly to volts. So at one g, we have 1 volt output, at 2 g's we have 2 volts output, etc. Analog signals have an advantage that they can represent any fractional quantity, by outputting an equivalent fractional quantity of voltage or current.

Put in a different manner an Analog signal is continuous in time and also continuous in value.

Uses of Analog
Analog signals have a number of uses. AM and FM radio, for instance, are signals that are transmitted in analog. Telephones (at least simple, older telephones) use analog signals to transmit voice data to the phone central office. Many electrical components, such as sensors, will output analog data, because of the accuracy that can be obtained from analog signals.

Digital
Digital signals are different from analog signals in that there are generally only two levels of voltage: high and low. These different voltage levels are put into a sequence to describe the value being transmitted. For convenience, regardless of the actual voltage levels used, a "high" is called a 1, and a "low" is called a 0. Each signal level must be transmitted for at least a certain period of time called the Bit Time. A single signal level for a single bit time is called a Bit.

From bits, we have Binary Numbers, a collection of bits that can be arranged to form larger quantities than the simple numbers 0 and 1.

Uses of Digital
Because bits can only be a 0 or a 1, digital transmissions don't have the same amount of accuracy as analog signals. Also, digital systems need to have complicated digital circuitry to read and understand the signals, that can cost more money than analog hardware does. However, the benefit is that digital signals can be manipulated, created, and read by computers and computer hardware.

Examples
One of the best examples of digital signals are the control signals and data that are in use on your computer. Computers are almost completely digital, except for the sound card (which produced analog sound signals), and maybe a few other peripherals. Cellphones now are mostly digital, and the internet is a digital network.


text:
Analog and Digital Conversion/Sampling and Reconstruction

Relationship Between A & D
Analog and digital signals both transmit information, and on occasion both signals can be used to transmit the same information. Sometimes digital information can be put through a machine called a "modulator" so that they can be transmitted over an analog network. Similarly, sometimes analog signals need to be digitized, to travel over a digital network. The modern telephone system, for instance, received analog signals from the handset, that are then turned into digital signals for transmission over a digital, fiber-optic network. Digital information stored on DVDs and CDs need to be converted to analog music and video signals, for use on analog TVs and Stereos. Both types of signals are highly useful, and they have moments where they each excel. However, there are plenty of times when we need to convert from one to the other, and that conversion process will be the primary focus of this wikibook.

Samplers
A device that converts an analog signal to a digital signal is called a sampler. There are other names for samplers, including "Analog to Digital Converters". This is usually abbreviated as ADC, A2D, A/D, or other similar abbreviations. The important point is that analog signals are converted into a digital equivalent, according to some particular rule.

The process of sampling, by necessity, causes a loss of information. If we are only sampling at particular times, for instance, all the information between those two times is lost. Also, because digital signals have less accuracy than analog signals, the sampled values may not even be expressed correctly. The effects of sampling on a signal have a number of names including "Sampling noise", "sampling error", or "converted signal degradation". While this may sound like a terrible situation, there are methods to decreasing this error, and we will discuss them in this book.

Reconstructers
Similar to samplers, but performing the exact opposite task, are Reconstructors. Reconstructors are frequently also known as "Reconstruction Circuits", or "Digital to Analog Converters". The later is frequently abbreviated as DAC, D2A, D/A, or other similar abbreviations.

Because digital signals don't have the same accuracy as analog signals, the reconstructed analog signal will have a certain amount of error associated with it. This error is frequently called the "Reconstruction noise", or "reconstruction error", and can become a large problem in sensitive applications.

Effects of Conversion
Sampling noise and Reconstruction noise not only combine in the final signal, but they can also be compounded over multiple stages of conversion. As a rule, every single conversion can lose data, or the amount of data can stay the same. However, a conversion can never "gain data". This can be demonstrated in computer audio or video, where every successive conversion between one file format to another can cause a loss of data, and the file never gets any better.


text:
Analog and Digital Conversion/The Ideal Sampler

Ideal Sampler
Let us say that we have a sampler device that operates as follows: every T seconds, the sampler reads the current value of the input signal at that exact moment. The sampler then holds that value on the output for T seconds, before taking the next sample. We have a generic input to this system, f(t), and our sampled output will be denoted f*(t). We can then show the following relationship between the two signals:

f*(t) = f(0)(u(0) - u(T)) + f(T)(u(T) - u(2T)) + ...

Note that the value of f* at time t = 1.5T = T. This relationship works for any fractional value.

Star Transform
Taking the Laplace transform of this infinite sequence will yield us with a special result called the star transform. The star transform is also occasionally called the "starred transform" in some texts.

The star transform is defined as such:

 * $$F^*(s) = \mathcal{L}^*[f(t)] = \sum_{i = 0}^\infty f(iT)e^{-siT}$$

The star transform depends on the sampling time, T, and is different for a single signal, depending on the speed at which the signal is sampled.

Sampler Block Diagram
A sampler is usually denoted on a circuit diagram as being a switch that opens and closes at set intervals. These intervals represent the sampling time, T.

Samplers work by reading in an analog waveform, and "catching" the value of that waveform at a particular point in time. This value is then fed into an ADC converter, and a digital sequence is produced.

The exact method by which the digital sequence is produced will be discussed later in the sections on quantization.

Sampling Delays
Real samplers take a certain amount of time to read the sample, and convert it into a digital representation. This delay can usually be modeled as a delay unit in series with the sampler.

Sampling Jitter
Samplers in real life don't always take a perfect sample exactly at time T, but instead sample "around" the right time. The difference between the ideal sampling time T, and the actual sample time is known as the "Sampling Jitter", or simply the jitter.


text:
Analog and Digital Conversion/Nyquist Sampling Rate

Aliasing
If a sampler is only reading in values at particular times, it can become confused if the input frequency is too fast. The resulting problem is called Aliasing, and is a major factor in Sampler design.

 * Aliasing:When the input signal frequency is faster than half the sampling frequency, the sampled result will appear to be a low-frequency wave.

In the image above, the black dots are the sampling points, and the red sinusoid is the input waveform. Notice that since the sampler is sampling so slowly, the output appears to be the blue waveform, which is slower.

Nyquist Sampling Rate
To avoid the problem of aliasing, the Nyquist Sampling Rate should be considered the slowest possible sampling rate. Any slower then the nyquist sampling rate, and the sampler is in danger of producing an aliased signal.

 * Nyquist Sampling Rate:The nyquist sampling rate is two times the highest frequency of the input signal.

For instance, if the input signal has a high-frequency component of 1 kHz, then the sampler must sample at least 2 kHz, or the signal might alias. However, if the sampler happens to sample the waveform exactly at the places where it crosses the zero line, it will appear like there is zero signal. Therefore, the nyquist sampling rate is a bare minimum, and it is recommended that samplers sample much faster than the minimum. For instance, one common guideline recommends sampling at least 10 times faster than the input signal.

When designing a system, there are 2 ways to prevent ultrasonic sounds (or other unwanted high-frequency noise) from aliasing to a lower frequency, becoming audible noise:
 * Adjust the capacitors or other components of the anti-aliasing filter so it blocks all frequencies more than half the sampling rate.
 * Adjust the sampling rate to more than twice the frequency of the highest frequency passed by the anti-aliasing filter.


text:
Analog and Digital Conversion/Hold Circuits

Zero Order Hold
The majority of DACs have "zero order hold" in their output. After feeding the data into the DAC, the DAC output jumps to a new output voltage. The DAC holds that output voltage constant for the entire sampling time, until a new value is fed into the DAC and the DAC output jumps to that new value.


text:
Analog and Digital Conversion/Reconstruction Effects

This page is going to talk about the effects of reconstruction.


text: Semiconductors/Emitter Followers

title: Semiconductors/Emitter Followers


text: Semiconductors/Transconductance

title: Semiconductors/Transconductance


text:
Semiconductors/Darlington Connections

Darlington Connections
two transistors connected together so that the current amplified by the first is amplified further by the second transistor. The overall current gain is equal to the two individual gains multiplied together

title: Semiconductors/Darlington Connections


text: Semiconductors/Miller Effect

title: Semiconductors/Miller Effect


text:
Analog and Digital Conversion/Resolution and Bitrate

Ideal Resolution
The resolution of a sampler is the number of bits that are used to represent each signal. For instance, a 12-bit sampler will output 12 bits of data for every sample. This means that there are 212 possible digital values that each sample can be converted to. In general, the more bits of resolution, the better (more faithful) the digital signal will be to the original. The resolution, $n$, is related to the number of steps, $m$, by the following formula:

 * $$2^n = m$$

Unipolar and Bipolar
Samplers come in two basic varieties: unipolar and bipolar. Basically, unipolar samplers only take positive values, and only output unsigned digital values. Bipolar converters can take positive and negative values, and output signed digital values. It is important to note that bipolar converters are generally symmetrical. That is, they have the same number of bits for expressing negative and positive numbers.

Sample Range
The range of possible samples is dependent on a number of factors, including the signed/unsigned number scheme in use by the converter, the resolution, and the step size.

 * Step Size:The step size of a sampler is the range of analog values that can be input before a bit is changed in the sampler. The step size (Δ) is given by the range ($R$) divided by the number of steps ($m$):

 * $$\Delta = \frac{R}{m}$$

The range of the sampler, $R$, is given by the difference between the minimum value, and the maximum value:

 * $$R = V_{max} - V_{min}$$

However, bipolar converters are generally symmetric. That is, they have the same amount of range below zero as they do above zero. If we want a converter that goes from −5V to +25V, we are going to need to get a converter that can handle from −25V to +25V, which means we are wasting at least 2/5ths of the possible range of the device.

Example
For instance, let's say that we have a converter that only takes positive values (nothing below 0 volts), and we have a resolution of 2 bits. Also, we want to be able to handle all input values up to and including 10 volts. This means that our range is from 0 volts to 10 volts:

 * $$R = 10 - 0 = 10$$

With 2 bits of resolution, we have a total number of steps of:

 * $$m = 2^2 = 4$$

And we have a step size of:

 * $$\Delta = \frac{10}{4} = 2.5$$

This means that the following analog values produce the following digital output patterns:

 * 0V <= V < 2.5V → 00
 * 2.5V <= V < 5.0V → 01
 * 5.0V <= V < 7.5V → 10
 * 7.5V <= V <= 10.0V → 11

Non-Ideal Resolution
As discussed above, the ideal resolution for a given AD converter is straightforward to compute. In practice, noise impacts the usable resolution that is available to us. Noise will be discussed in a future chapter in more detail, but we will only need a summary of these impacts to resolution for now.

Noise Impacts on Resolution
Noise exists in various parts of the system, ranging from the input signal source, crosstalk onto the input signal from the environment, the voltage reference used by the ADC, and even the thermal noise inherent to resistors. Noise can be a random or patterned distortion that is superimposed on top of the desired signal. This noise is then read by the ADC, thereby reducing the accuracy of the ADC. Accuracy is reduced, because the actual signal's value that we care about when the ADC takes a sample is distorted by noise. The ADC then quantizes this distorted signal.

There are various methods to increase accuracy, at the expense of other performance metrics, but let's review the ways that non-ideal resolutions can be calculated. Three primary measures are often used when discussing an ADC in practice. They are Effective Resolution, Noise-Free Resolution, and Effective Number of Bits (ENOB).

Effective Resolution
Effective resolution is used as a performance metric when the input waveform is DC. This situation would be encountered if you deployed a sensor that measured the hydraulic brake pressure on an automobile. These sensors typically convert a hydraulic pressure to a voltage or current output. While the output voltage will surely vary over time as the brake pressure builds and releases over a drive cycle, assume for now that the rate of change of the sensor's output voltage will be so significantly small compared to the sampling rate of the ADC that the input signal will appear essentially as DC.

Effective resolution is calculated by taking a ratio of the full-scale input voltage range by the ADC's RMS noise:

$$Effective\, Resolution = \log_2\frac{V_{IN}}{V_{RMS\,NOISE}}$$

Noise-Free Resolution
Noise-free resolution is also used as a performance metric when the input waveform is DC. Consider a similar situation as described above for effective resolution. Assume you wanted to present the brake pressure reading onto a display for the driver to read. You may not want the brake pressure display to fluctuate or flicker while the vehicle is in park. In this case, you would like to consider what your "Noise-free" or "Flicker-free" resolution is. Flickering of LSBs can occur due to noise, but digital signal processing can remove this effect. However, the usable resolution of the ADC is reduced. How much resolution are you left with in that situation?

Noise-free resolution is calculated similarly to effective resolution, however the full-scale input voltage range is divided by the peak-to-peak noise, not the RMS:

$$Noise\, Free\, Resolution = \log_2\frac{V_{IN}}{V_{Pk-Pk\,NOISE}}$$

Effective Number of Bits (ENOB)
Effective Number of Bits (ENOB) is used when the ADC input is an AC signal. ENOB takes into account not only the noise that is superimposed on the desired signal but also the distortion inherent to AC signals. These "spurious" signals show up in a spectrum analysis (typically performed by FFT) outside of the fundamental range. Harmonics are a subset of spurious signals, and they have a frequency that is a multiple of the fundamental frequency. The parameter that describes the performance of an ADC considering both total harmonic distortion (THD) (these spurious signals previously mentioned) and the signal to noise ratio (SNR) is called the Signal-to-Noise Ratio and Distortion (SINAD).

Sometimes SINAD is provided on the datasheet, but you may need to measure and/or calculate it. Measuring SINAD involves performing an FFT analysis on a near-full scale sinusoidal input to the ADC. The FFT analysis allows you to pull out both the noise and distortion components and compute the ratio between the RMS of the input voltage to the RMS of the noise & distortion components.

$$SINAD = -10\times\log_{10}\biggl(10^{\tfrac{-SNR}{10}}+10^{\tfrac{THD}{10}}\biggr)$$

$$SINAD = \frac{RMS\,input\,voltage}{RMS\,noise\,voltage}$$

$$ENOB = \frac{SINAD-1.76db}{6.02}$$

Bit rate
The number of bits created per sample, times the sampling frequency, gives us the rate at which we are producing data bits. This rate is called the bit rate, and is frequently denoted as $r_{b}$, or simply $r$.

If we have a sampling time of $T$ seconds, then the bit rate and the resolution are related as such:

 * $$r_b = \frac{n}{T}$$

Where $r$ is measured in units of bits/second, $T$ is measured in seconds, and $n$ is measured in bits.

Bandwidth
Bandwidth, denoted with a $W$, is the frequency range needed to transmit an analog or digital signal. This isn't directly related to the topic at hand, but is included for completeness. For more information about bandwidth, see Signals and Systems or Communication Systems. This text may use bandwidth as a constraint in example problems, but will not discuss it in any depth beyond this simple section.

Bandwidth is related to the bit rate as follows:

 * $$W = 2r_b$$

This is for a bare, unmodulated bit stream. This value can change depending on what modulation scheme is used, if any.


text:
Analog and Digital Conversion/Signed and Unsigned Quantities

Binary Number Representation
Any number can be represented using only "bits" (the digits 0 and 1); for example, the binary number 1101 represents thirteen. These bits, ordered in sequence, represent ascending powers of two.

 * $$1 \times 2^3 + 1 \times 2^2 + 0 \times 2^1 + 1 \times 2^0 = thirteen$$

The bit on the right is called the "Least Significant Bit" (LSB) because it represents 1, the lowest power of 2; and the bit on the left is called the "Most Significant Bit" (MSB) because it represents the highest power of two.

Unsigned Numbers
Unsigned numbers are represented in a straightforward manner, with the LSB on the right, and the MSB on the left. Unsigned numbers are always positive (or zero), because they don't have a sign for denoting negative numbers.

Signed Numbers
To represent negative numbers, we need to implement signed numbers. There are two general schemes for representing signed numbers: sign–magnitude, or two's compliment. There are other schemes as well, such as one's compliment, but we won't discuss them here. For more information on the subject, see the relevant sections of Digital Circuits.

Sign–Magnitude
Sign–magnitude numbers are the same as unsigned numbers, except with the addition of a "sign bit". If the sign bit is 0, the number is positive; if the sign bit is 1, the number is negative.

Two's Complement
The digital logic required to implement two's complement is significantly more simple to implement than a sign–magnitude representation. Therefore, most computers store values in two's complement format. Two's compliment numbers follow these rules:

 * 1) Half the numbers are positive, from 0 to ($N$/2)−1, where $N$ is the number of expressible values (including zero) that are possible with the number of bits. If we have $n$ bits, this value is:
 * $$N = 2^n$$
 * 1) Negative numbers are obtained by inverting the bits in the positive number, and then adding 1 to it.

For instance, if we have the number 5 (0101) in a four-bit two's compliment number, we can get the representation for −5 by inverting the number (1010), and adding 1 to it (1011).

To get the positive value of a negative number, we reverse the process.

For example, the 4 bit signed numbers (3 data bits + 1 sign bit) are:

0111 = +7 0110 = +6  0101 = +5  0100 = +4  0011 = +3  0010 = +2  0001 = +1  0000 = +0  1111 = −1  1110 = −2  1101 = −3  1100 = −4  1011 = −5  1010 = −6  1001 = −7  1000 = −8

Questions

 * Q) Didn't you just finish telling me a few pages ago that 1101 means thirteen?

Yes. It could also be a lot of other things too. The bits 1101 form a bit pattern that can be interpreted to mean anything. When we're talking about unsigned arithmetic, 1101 is "13" in decimal numbers. When we're talking about signed arithmetic, 1101 might mean −3 if we're doing 4-bit signed arithmetic.

 * In 16-bit signed arithmetic, 1101 is 13
 * In sign–magnitude representation, 1101 is −5.
 * In one's compliment, 1101 is −4

 * It's important to note that a single bit pattern might have different meanings depending on how you interpret it. Keeping the interpretation straight is therefore very important.

Floating-Point Numbers
An additional type of binary numbers are called "Floating Point" numbers. These numbers allow fractional quantities to be expressed using bits. Floating-point numbers are beyond the scope of this book, but keep in mind that some samplers output values in floating point format.


text: Analog and Digital Conversion/Spectral Effects


text:
Analog and Digital Conversion/Interpolation

Down Sampling
There are occasions when the sampler is producing samples too fast, or too slow for the rest of your circuit. When the sampler is producing too many samples, we need to remove some through a process called Down-Sampling. In a down-sampler, certain samples are removed from the digital signal, and the remainder of the samples may be altered to appear more "spread out".

Down-sampling is usually performed according to a fractional rule. An example would be a 2:1 down-sampler, which removes every second sample to decrease the bitrate in half.

Up Sampling
If the sampler isn't producing samples fast enough, we need to create more samples. The process of creating more samples is called Up-Sampling. In the most basic up-sampling scheme, additional samples with a value of zero are added between the existing samples. This method is called "Zero Padding", but other methods, such as interpolation can also be used.

Linear Interpolation
In linear interpolation, a straight-line is drawn between the two samples on either side of the new sample. The new sample value, then is considered to be a point on this straight line, or the average value. This is called linear interpolation, because the new samples will be on this line formed by the old samples.

As an example, consider that we want to double the sample rate by inserting linearly-interpolated samples between every two existing samples. In a linear system, the value of the new sample a between existing samples n and m would be:

 * $$a = \frac{n+m}{2}$$

Non-Linear Interpolations
Analog signals rarely have straight lines in them, and therefore linear interpolation doesn't always produce a good approximation. Nonlinear techniques can be used, taking the surrounding points to produce a new point that isn't just an average value. these methods are called "non-linear interpolation", and there are too many of them for us to give a good example of each.


text:
Analog and Digital Conversion/Differential Pulse-Coded Modulation

Pulse Code Modulation
Pulse Code Modulation is a method of digital transmission of analog signal. PCM converts the analog to Digital signal. Process of PCM: sampling--> Quantization--->Channel--->Hold Ckt--->LPF--->original signal.


text:
Analog and Digital Conversion/Delta Modulation

Delta Modulation
The sample values of analog waveforms of real world processes are very often predictable—i.e. the average change from sample to sample is very small. Hence we can make "educated guess" of what the next sample value depending on the current sample value. Though there is error, it is much less than peak to peak signal range. This concept is used in Predictive coded modulation, where instead of sending the signal, it transmits just the prediction errors. Delta Modulation employs Predictive coded modulation to simplify hardware

Delta Modulation is strange in the fact that it attempts to represent an analog signal with a resolution of 1 bit. This is accomplished by successive steps, either up or down, by a preset step size. In delta modulation, we have the stepsize (Δ) that is defined for each sampler, and we have the following rules for output:

 * 1) If the input signal is higher than the current reference signal, increase the reference by Δ, and output a 1.
 * 2) If the input signal is lower than the current reference signal, decrease the reference by Δ, and output a 0.

Some benefits of delta modulation are as follows:

 * 1 bit of resolution, and therefore requires very little bandwidth and very little hardware.
 * No preset upper or lower bounds, so Delta modulation can (theoretically) be used to modulate unbounded signals.

These benefits are countered by the problems of Slope Overload, and Granular Noise, which play an important role when designing a Delta Modulated system.

Slope Overload
If the input signal is rising or falling with a slope larger than Δ/T, where T is the sampling time, we say that the sampler is suffering from Slope Overload. In essence, this means that in a Delta Modulation scheme, we can never have slopes larger than a certain upper limit, and functions that rise or fall at a faster rate, are going to be severely distorted. If the slope of m(n Ts)is greater then the slope of m(n Ts- Ts), then Slope Overload distortion occurs.

Granular Noise
A problem with delta modulation is that the output signal must always either increase by a step, or decrease by a step, and cannot stay at a single value. This means that if the input signal is level, the output signal could potentially be oscillatory. That is, the output signal would appear to be a wave, because it would go up and down regularly. This phenomena is called Granular Noise.

When used in ADCs (Analog to Digital Converters), this problem can be solved by internally adding additional bit(s) of resolution that correspond to the value of Δ. This way, the LSBs (Least significant bits) that were added can be ignored in the final conversion result.

Delta-Sigma Modulation
A delta-sigma ADC—also called a sigma-delta ADC—use the delta modulation technique internally.


text: Analog and Digital Conversion/Continuously-Variable Slope Delta Modulation


text:
Analog and Digital Conversion/Uniform Quantization

Sampling Process
In signal processing, sampling is the reduction of a continuous signal to a discrete signal. A common example is the conversion of a sound wave (a continuous signal) to a sequence of samples (a discrete-time signal).


text:
Analog and Digital Conversion/Fixed Wordlength Effects

Practical Wordlengths
Computer systems, as we know, are commonly 16, 32, or 64 bits. This means that these computers can easily handle data of these lengths. However, smaller hardware and embedded computers can have wordlengths of 4 or 8 bits! If we have a converter that has a resolution of 12 bits, and we attach it to an 8 bit input bus for an embedded controller, we have a severe problem! a full 4 bits of our signal must be truncated.

Also, converters often come prepackaged, with a set number of resolution bits that aren't negotiable. This means that if you need a converter with 13 bits of resolution for your circuit, you will have to make due with a converter that is only 12 bits, or one that is 16!

Some common ADC converter resolution lengths are listed below:

 * 4
 * 8
 * 12
 * 16
 * 24
 * 32

Round-Off
Let's say that we do have a 12 bit converter, and we need to output the data onto an 8-bit bus. We can either ignore the bottom 4 bits, or the top 4 bits, or we can ignore some combination of both. If we ignore bits from the bottom of the word, we are essentially rounding the signal down, and the signal will lack detail.

Roundoff error is the difference between an approximation of a number used in computation and its exact (correct) value. In certain types of computation, roundoff error can be magnified as any initial errors are carried through one or more intermediate steps.

An egregious example of roundoff error is provided by a short-lived index devised at the Vancouver stock exchange (McCullough and Vinod 1999). At its inception in 1982, the index was given a value of 1000.000. After 22 months of recomputing the index and truncating to three decimal places at each change in market value, the index stood at 524.881, despite the fact that its "true" value should have been 1009.811.

Other sorts of roundoff error can also occur. A notorious example is the fate of the Ariane rocket launched on June 4, 1996 (European Space Agency 1996). In the 37th second of flight, the inertial reference system attempted to convert a 64-bit floating-point number to a 16-bit number, but instead triggered an overflow error which was interpreted by the guidance system as flight data, causing the rocket to veer off course and be destroyed.

The Patriot missile defense system used during the Gulf War was also rendered ineffective due to roundoff error (Skeel 1992, U.S. GAO 1992). The system used an integer timing register which was incremented at intervals of 0.1 s. However, the integers were converted to decimal numbers by multiplying by the binary approximation of 0.1, 0.00011001100110011001100_2=(209715)/(2097152).

As a result, after 100 hours (3.6×10^6 ticks), an error of (1/(10)-(209715)/(2097152))(3600·100·10)=(5625)/(16384) approx 0.3433 second

had accumulated. This discrepancy caused the Patriot system to continuously recycle itself instead of targeting properly. As a result, an Iraqi Scud missile could not be targeted and was allowed to detonate on a barracks, killing 28 people.

Truncation
The act of simply ignoring bits from either end of the word is called Truncation, but when we truncate the bits from the LSB side of the word, we call that action "Rounding". When we truncate the bits off the top of the machine word, we are potentially losing large amounts of data. For instance, if we have the bit pattern 101001, and we truncate the two MSB bits, we are left with the bit pattern 1001. Let's convert this to decimal:

 * 101001 (binary) = 41 (decimal)
 * 1001 (binary = 9 (decimal)

There is a big difference betweenthe value 9 and 41. As we can see, all our highest values will appear to be low values, and the output will be nonsensical. Another option is called saturation. Saturation is like rounding, except that we round up. We truncate the top bits off, and if they aren't zero, then we round the rest of the number up to the maximum value. For instance, if we have the same bit pattern as above (101001), and we truncate off the two MSB bits and then we saturate, we will get the value 1111. Now, we can define this value to be an overflow condition, and we won't be compounding needless errors.


text:
User talk:Brian

New Zealand Economics
It has been nearly a month since you mentioned a willingness to work on this book, and I was wondering if you had any plans in the future to do so. If you decide not to help out with this book, I highly doubt anybody else ever will, and I will probably vote to delete this or merge it into an appropriate destination. If I don't hear from you in about a week or so, I will assume you are no longer active, and I will vote to delete this module. Talk to you later. --Whiteknight (talk) (projects) 03:27, 10 July 2006 (UTC)

title: User talk:Brian


text:
User talk:Deranged physicist

Audiofiles from the book Chinese (Mandarin)
Hello Deranged physicist,

I'm de:User:MichaelFrey from de.wikibooks.org. One of our user de:User:Hjherbert translette the book Chinese (Mandarin) in to german.

He (de:User:Hjherbert) want to use your audiofile. Can you upload this audiofiles to the commons?

Thanks a lot

--- MichaelFrey 05:47, 10 July 2006 (UTC)

Not only one audio file, but all future audio files of chinese lessions. I copied the file "Image:Chinese-Lesson1-Dialogue1.ogg" to http://commons.wikimedia.org/ commons

Do you want yourself move the audio files from the english wiki en.wikibooks.org

I think in august I will start to move the files and add their link in all translations (slowly, because I do it as a hobby) Hjherbert 19:23, 12 July 2006 (UTC)

Thank you very much for the Chinese dialogue recordings. They sound very clear and will help learners who don't yet know pinyin to dive right in. Though I wonder, since you're a native speaker if you could find a friend or family member to do the other voice. Especially when a female character is speaking, it would add a lot of realism. Your part wouldn't need to be redone, as you could easily splice together the two files in a free program like Audacity or ask for my help for that part. --Everlong 14:50, 5 August 2006 (UTC)

title: User talk:Deranged physicist


text:
User:Banzaimonkey

Contact
Please see banzaimonkey on Wikipedia.

Wikibook Projects

Uploads
Programming:PHP cover:

Includes
Non-template includes must have a ":" before the local URL.

Code Templates
Template:Code

Links to Programming:PHP
Special:Whatlinkshere/Programming:PHP&limit=500&from=0

Programming:PHP Namespace
Special%3APrefixindex&from=Programming%3APHP%3A&namespace=0

title: User:Banzaimonkey


text:
Arabic/Basics of Conjugation

The basics of Conjugation

A verb is a word that indicates an action, or an existence.

Conjugation is all about how verbs change between sentences depending on a number of factors. The three most important factors are person, gender, and number.

Unlike English, in Arabic gender matters, and there are three numbers singular, dual, and plural (where plural means more than 2). In Arabic words have gender which effects conjugation.

Singular    Plural FIRST PERSON          I            we SECOND PERSON          you          you THIRD PERSON          he, she, it  they

The Persons of the Verb in Arabic

In the first Person Arabic works Exactly the same as English, I corresponds to ana and we corresponds to nahnu.

SINGULAR         PLURAL FIRST PERSON         نَحْنُ                    أنا

In the Second Person, Arabic does not use the same word for singular and plural. Instead they are different. Singular    Plural SECOND PERSON                 أَنْتُم      أَنْتَ

Therefore if you were talking to one person you address him with anta but if you were talking to a group you would use antum.

Singular           Plural SECOND PERSON             أَنتُنَّ, أَنتُم          أَنتِ, أنتَ

In Arabic it is important to distinguish genders properly in the second person. One reason is that purposely using the wrong gender can show great disrespect to a person. So use anti when talking to a girl. antenna however is special because you must only use it when speaking to a group of exclusively females.

The dual however doesn't have a gender. Mainly because Singular           Dual               Plural SECOND PERSON               أَنتُنَّ, أَنتُم          أَنتُما           أَنتِ,أَنتَ

But There is also a dual, so if you were talking to 2 people you would not say antum but rather antumaa. Singular          Dual          Plural THIRD PERSON  huwa,hiya       humaa        hum[u],hunna

Notice that in the English third person singular there were three pronouns: he, she , and it. In Arabic there are only two because Arabic has no word that works as a pronoun like it does. Because Arabic words have gender there is no need for it. huwa corresponds to he   and hiya  corresponds to she. huwa corresponds to it when the noun replaced is masculine. hiya corresponds to it when the noun is feminine.

In English we use it for inanimate things only. In Arabic when there are 3 or more inanimate things they must be treated like the third person feminine singular in all grammatical respects.

SINGULAR  PLURAL FIRST PERSON   an‰             naxynu SECOND PERSON  anta,anti            antumaa               antum,antunna THIRD PERSON  huwa,hiya       humaa,humaa        hum[u],hunna

Using Plurals to show respect: Although in expressions like "el-salaamu rhalaikum" where the pronoun used is plural no matter who you are addressing, Arabic tends to not use plurals to show respect. The most commonly known is the use of "we" instead of "I" when one thinks one is extremely great. To show respect to someone you avoid using the personal pronouns, and address the persons presence instead.

+possessive pronouns

Titles also work: سَيِّد, سَيِّدة حاجّ, أُستاذ

Verb Classes

Arabic Verb classes are numbered from 1-15. Class 11 is very rare, classes 11-15 are for the most part theoretical. Verb class 1 is the simplest and most common. The general function of most verb classes is well understood. For example,verb class 7 usually gives a reflexive/intransitive meaning. Class 2 gives an emphatic meaning, Class 3 gives the meaning of trying. However these are abstract meanings or functions and serve better as mnemnomic tools to a user of Arabic than anything else.

These Verb Classes do not change the set of endings, they only change the root form.

title: Arabic/Basics of Conjugation


text:
Haskell/Arrows

Introduction
Arrows are a generalization of monads: every monad gives rise to an arrow, but not all arrows give rise to monads. They serve much the same purpose as monads -- providing a common structure for libraries -- but are more general. In particular they allow notions of computation that may be partially static (independent of the input) or may take multiple inputs. If your application works fine with monads, you might as well stick with them. But if you're using a structure that's very like a monad, but isn't one, maybe it's an arrow.

and the arrow tail
Let's begin by getting to grips with the arrows notation. We'll work with the simplest possible arrow there is (the function) and build some toy programs strictly in the aims of getting acquainted with the syntax.

Fire up your text editor and create a Haskell file, say toyArrows.hs:

These are our first two arrows. The first is the identity function in arrow form, and second, slightly more exciting, is an arrow that adds one to its input. Load this up in GHCi, using the -XArrows extension and see what happens.

% ghci -XArrows toyArrows.hs     ___         ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / /  | |      GHC Interactive, version 6.4.1, for Haskell 98. / /_\\/ __ / /___| |      http://www.haskell.org/ghc/ \____/\/ /_/\____/|_|     Type :? for help.

Loading package base-1.0 ... linking ... done. Compiling Main            ( toyArrows.hs, interpreted ) Ok, modules loaded: Main. 3 "foo" 4 101
 * Main> idA 3
 * Main> idA "foo"
 * Main> plusOne 3
 * Main> plusOne 100

Thrilling indeed. Up to now, we have seen three new constructs in the arrow notation:
 * the keyword
 * the imported function
 * the imported function

Now that we know how to add one to a value, let's try something twice as difficult: adding TWO:

One simple approach is to feed (a+1) as input into the  arrow. Note the similarity between  and. You should notice that there is a basic pattern here which goes a little something like this: proc FOO -> SOME_ARROW -< (SOMETHING_WITH_FOO)

notation
Our current implementation of  is rather disappointing actually... shouldn't it just be   twice? We can do better, but to do so, we need to introduce the do notation:

Now try this out in GHCi:

Prelude> :r Compiling Main            ( toyArrows.hs, interpreted ) Ok, modules loaded: Main. 7
 * Main> plusTwoBis 5

You can use this do notation to build up sequences as long as you would like:

Monads and arrows

 * FIXME: I'm no longer sure, but I believe the intention here was to show what the difference is having this proc notation instead to just a regular chain of dos

/Not in book

title: Haskell/Arrows


text:
Talk:Haskell/Arrows

Reinstating this page after following the move to Haskell/Understanding arrows and the subsequent recreation. --Duplode (discuss • contribs) 23:56, 6 May 2012 (UTC)

title: Talk:Haskell/Arrows


text:
Talk:Find Employment/Introduction

The summer jobs part should be removed or moved somewhere else. This book should be generic.

title: Talk:Find Employment/Introduction


text:
Algorithm Implementation/Hashing

Hashing algorithms are generically split into three sub-sets:
 * Indexing Algorithms: generally used to quickly find items, using lists called "hash tables".
 * Checksums: often used for simple data checking, to detect any accidental bit errors during communication—we discuss them in an earlier chapter, ../Checksums/.
 * Message Digests: a cryptographically secure one-way function, and many are closely examined for their security in the computer security field.

Jenkins one-at-a-time hash
The "Jenkins One-at-a-time hash", from an article by Bob Jenkins in Dr. Dobb's September 1997.

C:

Java:

See Data Structures/Hash Tables for more details on the "Jenkins One-at-a-time hash".

other hash functions for hash tables
Other popular hash functions for hash tables include: other Jenkins hash functions, CityHash, and  MurmurHash. It may be desirable to use a keyed hash function to resist "hash flooding": modern implementations use SipHash for this purpose; others use a "universal" hash function.

Checksums and Cyclic Redundancy Checks
See Algorithm Implementation/Checksums.

Message Digests
The state-of-the-art for message digests and what is considered secure change frequently. The US NSA holds algorithm contests and select the winners as SHAs, the "Secure Hashing Algorithms".

 * MD5 (RFC 1321) and its predecessors MD2 and MD4 are all broken. They are now both obsolete and insecure.
 * SHA0/SHA1 (FIPS-180-1) are partially broken. They are obsolete and considered insecure against well-funded opponents since 2005.
 * SHA-2 is not yet considered broken, but is vulnerable to length extension attacks.
 * SHA-3 (Keccak) is not vulnerable to length extension attacks.
 * KangarooTwelve is an extremely parallelized (hence very fast) version of Keccak. It is not vetted by the NSA, but the authors believe it is as secure as SHA-3.
 * BLAKE is a hash function that made it to the final round of the SHA-3 contest. The BLAKE2b variant is widely used and considered secure (as of 2020). It also has an extremely parallelized version called BLAKE3.

Although these algorithms can be implemented directly from the specification, as with other forms of cryptography it is usually safer and faster to use a thoroughly-reviewed open-source library.

title: Algorithm Implementation/Hashing


text:
WebObjects/Project WONDER/Frameworks/ExcelGeneration

Anjo Krank
You need to override appendToResponse on your page and make it look similar to:

public void appendToResponse(WOResponse response, WOContext context) { super.appendToResponse(response, context); if(reportData != null) { response.setContent(reportData); reportData = null; String fileName = "results.xls"; response.setHeader("inline; filename=\"" + fileName + "\"", "content-disposition"); response.setHeader("application/vnd.ms-excel", "content-type"); enableExcel = false; } }


text:
Circuit Theory/Transform Domain

Impedance
Let's recap: In the transform domain, the quantities of resistance, capacitance, and inductance can all be combined into a single complex value known as "Impedance". Impedance is denoted with the letter Z, and can be a function of s or jω, depending on the transform used (Laplace or Fourier). This impedance is very similar to the phasor concept of impedance, except that we are in the complex domain (laplace or fourier), and not the phasor domain.

Impedance is a complex quantity, and is therefore comprised of two components: The real component (resistance), and the complex component (reactance). Resistors, because they do not vary with time or frequency, have real values. Capacitors and inductors however, have imaginary values of impedance. The resistance is denoted (as always) with a capital R, and the reactance is denoted with an X (this is common, although it is confusing because X is also the most common input designator). We have therefore, the following relationship between resistance, reactance, and impedance:

 * $$Z = R + jX$$

Susceptance and Admittance
The inverse of resistance is a quantity called "Conductance". Similarly, the inverse of reactance is called "Susceptance". The inverse of impedance is called "Admittance". Conductance, Susceptance, and Admittance are all denoted by the variables Y or G, and are given the units Siemens. This book will not use any of these terms again, and they are just included here for completeness.

Parallel Components
Once in the transform domain, all circuit components act like basic resistors. Components in parallel are related as follows:

 * $$Z_1 || Z_2 = \frac{Z_1 Z_2}{Z_1 + Z_2}$$

Series Components
Series components in the transform domain all act like resistors in the time domain as well. If we have two impedances in series with each other, we can combine them as follows:

 * $$Z_1 \mbox{ in series with } Z_2 = Z_1 + Z_2$$

title: Circuit Theory/Transform Domain


text:
Talk:Data Coding Theory/Data Compression

Copy the text of wikipedia over here and append more information later?
 * That is called "Forking", and is against policy. You are more then welcome to adapt information from the wikipedia article, but you shouldn't copy it directly. Plus, this page doesnt want to be the definative source to lossless compression, only a quick overview with links to better resources. A complete coverage of the material is outside the scope of this book. --Whiteknight (talk) (projects) 13:50, 10 July 2006 (UTC)

For people who want to talk about data compression algorithms, and perhaps share test harnesses and example code, saying "don't talk about data compression" is a little rude. Would it be better to create a Wikibook dedicated to data compression, or to point them to one of the wiki dedicated to data compression? --DavidCary (talk) 23:37, 9 December 2007 (UTC)


text:
Blender 3D: Noob to Pro/Making exe

This tutorial will show you how to make an executable for your game made in Blender.

Note: The methods listed in the "Windows" and "GNU/Linux or Mac OS X" sections work only for the operating system you are on when you create the file. To make it cross platform, use the "BlenderPlayer" method.

Windows
First create a folder that will hold all your game information. Name it something meaningful, like "Yo Frankie!".

The folder must contain four files that you can copy from your blender installation directory.(under windows it should be "C:\Program Files\Blender Foundation\Blender") They are: (sometimes you will need the following also... They are in the same folder.)
 * 1) SDL.dll
 * 2) python24.dll ''(Or other relevant python file; python25.dll, python26.dll etc.)
 * 3) pthreadVC2.dll
 * 4) zlib.dll
 * 1) avformat-51.dll
 * 2) avutil-49.dll
 * 3) avcodec-51.dll

Not quite a Noob Note: If you are using the latest version of Blender you WILL need the following files)

I am running windows xp media edition and blender 2.46, here is a full list of files i needed:
 * 1) avcodec-51.dll
 * 2) avformat-52.dll
 * 3) avutil-49.dll
 * 4) libfaac-0.dll
 * 5) libfaad-0.dll
 * 6) libmp3lame-0.dll
 * 7) libx264-59.dll
 * 8) pthreadVC2.dll
 * 9) python25.dll
 * 10) SDL.dll
 * 11) swscale-0.dll
 * 12) vcomp90.dll
 * 13) xvidcore.dll
 * 14) zlib.dll

On Blender 2.48a (Windows XP Media Center 2002, SP3), these .manifest files are also required:
 * 1) blender.exe.manifest
 * 2) blenderplayer.exe.manifest
 * 3) Microsoft.VC90.CRT.manifest
 * 4) Microsoft.VC90.OpenMP.manifest

If you use random Python module in your game, you will have to add one more file to your game directory. For Blender 2.49 it would be python26.zip, which you can find in Blender main directory (where blender.exe is). Otherwise there may be some errors during executing the game in system without installed Python.

Since Blender 2.56 you will need to enable Save As Runtime; first open blender with the game that you have created and open the file menu. Click on User Preferences then select Add Ons then Game Engine, check the box Game Engine Save As Runtime and return to the file menu. Save As Runtime will appear as an option in the export menu then save to the new folder that you have created and rename the file yourgamename.exe,

and then you can run the game!

If you encounter errors during the "Save As Runtime" process (I'm on Windows 7) you can right click on the Blender icon and select "Run as administrator". So you will have your fresh .exe and you can spread it with a piece of your favourite pepperoni pizza.

Making A Screensaver (Windows Only)

 * 1) First, save your runtime (that's the .exe addressed above.) via File->Save Game as Runtime. ("Save Runtime" in older versions)
 * 2) Now, go to your .exe game and rename it .scr - for instance, if your game was NotMyGame.exe, rename it to NotMyGame.scr. You can now right click to Install it, and then use it as your regular screensaver by applying it as you would any other screensaver (right click on desktop, properties...  You know the drill.)

Screensavers are not games, and so they should not accept input. At most, they should be videos showing what your game does. If you just rename your regular game as a .scr, it will be remarkably boring, because your game needs input and screensavers do not.

Intel screensaver bug
There is a caveat with Intel Integrated Graphics drivers, found in many laptops though. The graphics driver shuts off OpenGL acceleration for screensavers, for some obscure reason. The way to work around this is to rename the .scr extension to a .sCr as the driver's algorithm is dependent on case-sensitive characters. If you experience very low framerates in your screensaver, you should attempt this fix, It is tested and reported to work.

GNU/Linux or Mac OS X
Open blender with the game that you have created and open the file menu. Click on Save Game as Runtime and then save to the new folder that you have created and rename the file yourgamename...

and then you can run the game!

BlenderPlayer
The methods shown above only create an executable for your operating system. Well, BlenderPlayer can fix that.
 * 1) Make a new folder to store all your game data.
 * 2) Then save your .blend file into the directory.
 * 3) You can skip this step and the next step if you do not want a Windows version. For the Windows users, copy blenderplayer.exe to the new folder from a Windows copy of Blender. Then copy all your DLL files for Blender as mentioned for Windows to the folder.
 * 4) Next you have to make an MS-DOS batch file (for UNIX users, this is the shell script equivalent). In a simple text editor, in CR-LF mode if available (Notepad is always in this mode, and NOT a word processor!), copy and paste this text:  Save it as YourGameName-Windows.bat in your game folder.
 * 5) You can skip this step if you do not want a UNIX (basically Mac OS X and GNU/Linux) port. For GNU/Linux (at least), make a shell script. (A shell script is the UNIX term for a batch file.) In a simple text editor, in LF mode (unfortunately Notepad can't be used), copy and paste this text:  Save the file as YourGameName-UNIX.sh in your game folder. You will need to have BlenderPlayer in the same directory as the .blend game file.
 * 6) Write a readme for your program. This is again best done with a simple text editor like Notepad or gedit, but it does not matter which mode it is in. You should include the name of the game, a description, perhaps a walkthrough or hints, and if you made a *NIX port, mention that it requires BlenderPlayer, available with Blender.

Legal Issues
Blender and the BlenderPlayer fall under the GNU General Public License. Blend files are copyrighted to their respected owners and do not fall under the GPL as long as they are not packed in the BlenderPlayer. If a user does not want the blend files to fall under the GPL, it is recommended not to use the "Save Game as Runtime" feature. To put it another way, the user must keep the blend files and the BlenderPlayer in separate files. More information can be found at http://www.blender.org/education-help/faq/gpl-for-artists/. (Blender 2.4 now has a run game from file actuator.)

Proprietary Blend Files
Blender has no built-in functionality to "lock" or protect user generated content. As a result, anyone who has Blender can open and/or modify blend files. However, it's still possible to lock blend files. Common methods involve encrypting the blend file and then temporary decrypting it at runtime. This can be accomplished by using python scripts or by using external 3rd party applications (which are feasible under the GPL v2).

title: Blender 3D: Noob to Pro/Making exe


text:
Modern Greek/Lesson 3x

This is the third lesson teaching you how to read, write and pronounce Greek. Already you know 10 of the 24 Greek letters. By the end of this lesson, you will know more than half of the alphabet.

The next letter you should learn is Pi:

Π π

Both the capital and the small letter look different from the Latin alphabet, but they should be familiar to anybody with a high school education in maths. Pi is pronounced as a regular P (IPA [p]). Here are some sample words that you should be able to read now:

Πεκίνο (old European name for Beijing) Πιέρ (French name) ρεπόρτερ πακέτο Πάολο Νεπάλ

Now you're probably wondering how to write B. The answer is not Beta, because Beta is pronounced in Modern Greek as an English V. In order to represent the sound of a regular B, Greeks need two letters: Mu and Pi (μπ). Sometimes at the middle of a word μπ may sound like [mb], but this detail is not very strict for the pronunciation. Here are some examples:

μπαρ μπικίνι μπετόν μπανάνα Καμπέρα Μπενίν

Now you're going to learn an extremely important letter, which is very common in Greek: Sigma.

Σ σ ς

Sigma has three forms, rather than just two like the other letters. There's one capital sigma (Σ), which is also used in science, e.g. as the mathematical symbol for sums, and there are two versions of small sigma. The first one (σ), which looks like a circle with an added line is used at the start or the middle of a word. The second small sigma (ς), looking similar to an ill-proportioned small S is only used at the end of a word. Sigma is pronounced as an English S (IPA [s]). Knowing this letter (and the ones taught before), you can read lots of new words:

παπάς (not "dad" but the Greek word for "priest") μπαμπάς (this is the correct word for "dad") Πέτρος (common Greek name) Ισπανία (important country in Europe) Κόστα Ρίκα Πακιστάν Σρι Λάνκα Λάος Παρίσι (capital of France) Όσλο Σαν ... (common start for city names) Μπρισμπέιν (city in Australia) Καράκας Σάο Πάολο Ελσίνκι ιστορία

Now it's time for another letter combination, similar to μπ. When they mean the sound of D, Greeks don't write Delta but Nu and Tau combined: ντ. Sometimes at the middle of a word ντ may sound like [nd], but this is not very strict for right pronunciation. Generally, it's used to mean [d] especially in foreign words. Example words:

Σαντάμ Μόντρεαλ Τορόντο Ντολόρες Αντόνιο Μαντόννα ντισκοτέκ

Delta, the letter you might expect to sound like D, actually sounds like th in "this" (IPA: [ð]). The capital form closely resembles the Cyrillic letter Д. Here's the letter, the last one for this lesson:

Δ δ

Delta appears in lots of words, so take this opportunity for a major revision:

Ιρλανδία Καναδάς Ολλανδία Ανδόρρα Δανία (country north of Germany) Ινδία Ιορδανία Ισλανδία διαμάντι διάλεκτος Ανδρέας δισκέτα Λονδίνο (capital of the UK) Τολέδο Ρόδος

That's it for this lesson! If you didn't have trouble reading the example words, you're ready to continue with lesson 4!

Solutions

title: Modern Greek/Lesson 3x


text:
Talk:Java Programming/API/java.lang.Object

hasCode method
In this section, I'd tried to give a generic way how the hasCode may be used in a Collection. I do not know precisely how it is done, also probably there is a math behind it. If anybody know procisely how the hasCode is used, may want to add it here or the Java Programming/Collections Ervinn 16:52, 10 July 2006 (UTC)


text:
Wikijunior:How Things Work/Microwave oven

A Microwave oven is designed to heat most foods in a quick and convenient way. The name Microwave is derived from the energy used to cook the food, microwaves, which pass through the cells and molecules of the food, the frequency of the waves causes the water molecules to vibrate, this movement generates heat. These microwaves are produced by a device called a magnetron within the microwave oven.

Who invented it?
Dr. Percy Spencer, a self-taught engineer with the Raytheon Corporation, observed the magnetron tube's radiative effects when a candy bar placed in his pocket melted while testing a new vacuum tube called a magnetron. He then tried this with oiled corn (which popped) and an egg (which exploded,) and observed rapid heat development and eventual cooking of these foods.

How does it get power?
The oven is attached to a power socket by a plug. This feeds electricity into the oven, powering it up!

How does it work?
An internal device called a magnetron is inside the oven. When you press 'Start', the magnetron starts emitting microwaves, which are like radio waves but at a higher frequency (the length between the waves is much shorter, so they pack more zappo and therefore more energy.) These waves bounce up and down and left and right around the oven. When they come in contact with the food, the energy from the microwaves causes molecules in the food to start moving around. This is basically what heat is -- molecules getting excited and moving around rapidly -- so this means the temperature rises. That then cooks the food! Microwaves work especially well to heat water molecules, but they also heat fats and sugars in your food. This is why foods with fats and sugars in them heat up much faster and much more than foods without them.

How dangerous is it?
A microwave oven is not very dangerous, but it does have electric components inside that could be dangerous if you took the microwave apart. A metal screen on the door prevents microwaves from escaping the oven while it is operating. Once the oven stops, the microwaves disappear immediately so they are not dangerous when you open the door. However, if there is a hole in the door or the microwave malfunctions, microwaves could escape the oven and burn or cook you if you're standing right in front of it. It has also been claimed that leaking microwaves could cause birth defects in pregnant women. You should not put metal objects in a microwave, such as a fork, because it could cause arcing, which will damage the oven. Another danger of microwaves is that, if heated for too long, water could become superheated -- heated above its boiling point, even though it doesn't appear to be boiling. It could abruptly boil when you move it, scalding you.

What does it do?
Microwaves seem to cook food from the inside out.

How does it vary?
Ovens vary in wattage (how much power they cook with). A medium-power microwave might be 1,000 watts or a kilowatt. A larger one might be 1.5 kilowatts.

How has it changed the world?
Microwave ovens have made cooking and reheating food much much easier.

What idea(s) and/or inventions had to be developed before it could be created?
As mentioned above, the magnetron had to be invented before microwaves could be used for cooking.