home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / forth / compiler / fpc / tutor / l2p020 < prev    next >
Text File  |  1990-07-15  |  2KB  |  63 lines

  1.        ╔════════════════════════════════════════════════════╗
  2.        ║ Lesson 2 Part 020  F-PC 3.5 Tutorial by Jack Brown ║
  3.        ╚════════════════════════════════════════════════════╝
  4.  
  5.                    ┌───────────────────┐
  6.                    │  What is a BYTE?  │
  7.                    └───────────────────┘
  8.  
  9. - The smallest piece of data that can be accessed by most
  10.   microcomputers.
  11.  
  12. - Consists of a memory unit of 8 binary bits. A binary bit is a 0 or 1)
  13.  
  14.         |0|1|1|1|0|1|0|1|   <--- bit pattern in memory cell or byte.
  15.          7 6 5 4 3 2 1 0    <--- bit number
  16.  
  17. - Bit 0 is called the low order bit, bit 7 is called the high order bit.
  18.  
  19. - The bit pattern in a cell may represent:
  20.   i)   any decimal number from 0 through 255.
  21.   ii)  any hexadecimal number from $00 through $FF.
  22.   iii) any binary number from 00000000 through 11111111
  23.  
  24. - Often the byte is often used as the data structure to represent an
  25.   ASCII character.
  26.  
  27.                    ┌───────────────────┐
  28.                    │  What is a WORD?  │
  29.                    └───────────────────┘
  30.  
  31. - Consists of two bytes or 16 binary bits.
  32.  
  33. - The bit pattern in a word can represent:
  34.   i)   any unsigned decimal number from 0 through 65,535
  35.   ii)  any unsigned hexadecimal number from $0000 through $FFFF
  36.   iii) any binary number from 0000000000000000 through 1111111111111111
  37.  
  38. - Often the word is used as the data structure to represent short
  39.   integers in computer languages such as C, Pascal and Forth.
  40.  
  41. - ** The numbers we place on Forth's parameter stack are words  **
  42.   ** and hence are short integers from 0 through 65,535 decimal **
  43.  
  44. - 8 bit micro processors such as the 6502, 8080 use the word as a memory
  45.   pointer into their 64K address space.  Micro processors such as the
  46.   80x86 and 680x0 often use the word as a pointer into a 64K segment or
  47.   array of 64K bytes.
  48.  
  49.                   ┌───────────────────────────┐
  50.                   │ Forth's parameter stack.  │
  51.                   └───────────────────────────┘
  52.  
  53. All computers represent numbers internally as bit patterns of zeros and
  54. ones.  The numbers on Forth's parameter stack are 16 bits wide and can
  55. be used to represent either 16-bit signed integers or 16-bit unsigned
  56. integers.
  57.  
  58. ┌────────────────────────────────────┐
  59. │  Please move to Lesson 2 Part 025  │
  60. └────────────────────────────────────┘
  61.  
  62.  
  63.