ABA


"''מה זה מספר?'' - קטע קצר באנגלית על מספרים במחשב"
גירסת הדפסה        
קבוצות דיון פיתוח, תיכנות ובניית אתרים נושא #13336 מנהל    סגן המנהל    מפקח   Winner    צל"ש   מומחה  
אשכול מספר 13336
MULI

דרג אמינות חבר זה
   11:37   29.05.06   
אל הפורום  
  ''מה זה מספר?'' - קטע קצר באנגלית על מספרים במחשב  
 
   הקטע הזה לקוח מהספר Write Great Code Understanding The Machine Volume I
זה קטע מאוד בסיסי, אבל איך אומרים... הבסיס הכי חשוב

2.1 What Is a Number?
Having taught assembly language programming for many years, I've discovered that most people don't understand the fundamental difference between a number and the representation of that number. Most of the time this confusion is harmless. However, many algorithms depend upon the internal and external representations we use for numbers to operate correctly and efficiently. If you do not understand the difference between the abstract concept of a number and the representation of that number, you'll have trouble understanding, using, or creating such algorithms. Fully understanding this difference could take you from creating some mediocre code to creating great code.

A number is an intangible, abstract, concept. It is an intellectual device that we use to denote quantity. Let's say I were to tell you that 'some book has one hundred pages.' You could touch the pages - they are tangible. You could even count those pages to verify that there are one hundred of them. However, 'one hundred' is simply an abstraction that I would be applying to the book as a way of describing its size.

The important thing to realize is that the following is not one hundred:

100

This is nothing more than ink on paper forming certain lines and curves. You might recognize this sequence of symbols as a representation of one hundred, but this is not the actual value 100. It's just three symbols appearing on this page. It isn't even the only representation for one hundred - consider the following, which are all different representations of the value one hundred:

100
decimal representation

C
Roman numeral representation

6416
base 16/hexadecimal representation

11001002
base two/binary representation

1448
base eight/octal representation

one hundred
English representation

The representation of a number is (generally) some sequence of symbols. For example, the common representation of the value one hundred, '100,' is really a sequence of three numeric digits: the digit 1 followed by the digit 0 followed by a second 0 digit. Each of these digits has some specific meaning, but we could have just as easily used the sequence '64' to represent the value one hundred. Even the individual digits that comprise this representation of 100 are not numbers. They are numeric digits, tools we use to represent numbers, but they are not numbers themselves.

Now you may be wondering why we should even care whether a sequence of symbols like '100' is the actual value one hundred or just the representation of this value. The reason for this distinction is that you'll encounter several different sequences of symbols in a computer program that look like numbers (meaning that they look like '100'), and you don't want to confuse them with actual numeric values. Conversely, there are many different representations for the value one hundred that a computer could use, and it's important for you to realize that they are equivalent.


                                שתף        
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד

  האשכול     מחבר     תאריך כתיבה     מספר  
  אני לא מאמין שמישהו באמת חקר את זה :| Dark Megical 29.05.06 11:48 1
     לפחות נגמר המלוה.... =\ MULI 29.05.06 11:52 2
  ממתי יש 2 בבסיס בינארי? :) bizho 29.05.06 12:27 3
     חח לא זה פשוט 2 קטן בספר MULI 29.05.06 12:57 4
         לא להתייחס, חשבתי שהתכוונת למשהו שונה לגמרי... Phinox  29.05.06 16:20 5
         2 תחתית, כמו חזקה אבל למטה :P Nesher  29.05.06 19:54 6
             כן, סבבה. bizho 29.05.06 21:09 7
                 או לרשום ליד... Nesher  29.05.06 22:18 9
  אחד הדברים ההזוים ביותר שמישהו עשה no_angel 29.05.06 21:57 8
  טוב....נחמד. MadXP 30.05.06 00:32 10

       
Dark Megical

דרג אמינות חבר זה
   11:48   29.05.06   
אל הפורום  
  1. אני לא מאמין שמישהו באמת חקר את זה :|  
בתגובה להודעה מספר 0
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
MULI

דרג אמינות חבר זה
   11:52   29.05.06   
אל הפורום  
  2. לפחות נגמר המלוה.... =\  
בתגובה להודעה מספר 1
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
bizho

דרג אמינות חבר זה
   12:27   29.05.06   
אל הפורום  
  3. ממתי יש 2 בבסיס בינארי? :)  
בתגובה להודעה מספר 0
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
MULI

דרג אמינות חבר זה
   12:57   29.05.06   
אל הפורום  
  4. חח לא זה פשוט 2 קטן בספר  
בתגובה להודעה מספר 3
 
   הפורום לא תומך בזה =\
זה יענו להראות שהמספר בבסיס 2
אם תבדוק את הבינארי בלי ה2 תראה שזה 100


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
Phinox 
חבר מתאריך 3.9.05
3489 הודעות, דרג אמינות חבר זה
   16:20   29.05.06   
אל הפורום  
  5. לא להתייחס, חשבתי שהתכוונת למשהו שונה לגמרי...  
בתגובה להודעה מספר 4
 
   ערכתי לאחרונה בתאריך 29.05.06 בשעה 16:22 בברכה, Phinox
 
בטעות... ;) המשך יום טוב!

בברכה, אריה!


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
Nesher  לחץ כאן להצגת דירוג המשתמש
חבר מתאריך 2.7.02
2 הודעות, 24 פידבק, 43 נקודות
   19:54   29.05.06   
אל הפורום  
  6. 2 תחתית, כמו חזקה אבל למטה :P  
בתגובה להודעה מספר 4
 


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
bizho

דרג אמינות חבר זה
   21:09   29.05.06   
אל הפורום  
  7. כן, סבבה.  
בתגובה להודעה מספר 6
 
   פשוט, אם הפורום לא תומך בזה, אפשר לכתוב את הבסיס בסוגריים.


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
Nesher  לחץ כאן להצגת דירוג המשתמש
חבר מתאריך 2.7.02
2 הודעות, 24 פידבק, 43 נקודות
   22:18   29.05.06   
אל הפורום  
  9. או לרשום ליד...  
בתגובה להודעה מספר 7
 
בכל מקרה זה נשמע מוזר אבל קצת מעניין


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
no_angel
חבר מתאריך 20.3.02
4989 הודעות, דרג אמינות חבר זה
   21:57   29.05.06   
אל הפורום  
  8. אחד הדברים ההזוים ביותר שמישהו עשה  
בתגובה להודעה מספר 0
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
MadXP

דרג אמינות חבר זה
   00:32   30.05.06   
אל הפורום  
  10. טוב....נחמד.  
בתגובה להודעה מספר 0
 
  


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד

תגובה מהירה  למכתב מספר: 
 
___________________________________________________________________

___________________________________________________________________
למנהלים:  נעל | תייק בארכיון | מחק | העבר לפורום אחר | מחק תגובות | עגן אשכול
       



© כל הזכויות שמורות ל-רוטר.נט בע"מ rotter.net