// you’re reading...

Variable and Data Types

Representing a Word

(Image-1)

Word



A word

  • Is a group of 16 consecutive bits



The bits

  • Are counted from right to left starting at 0 (Image-1):



Considered as a group of 16 bits (Image-1)

  • The most right bit of a word, bit 0, is called the least significant bit or Low Order bit or LO bit or LOBIT
  • The most left bit, bit 15, is called the most significant bit or High Order bit or HI bit or HIBIT
  • The other bits are referred to using their positions: bit 1, bit 2, bit 3, etc



(Image-2)

Word is made of two bytes



Considering that a word is made of two bytes (Image-2)

  • The group of the right 8 bits is called the least significant byte or Low Order byte or LO byte or LOBYTE
  • The other group is called the most significant byte or High Order byte or HI byte or HIBYTE



The most fundamental representation of a word in binary format

  • Is 0000000000000000 (B-1)



(B-1) To make it easier to read

  • You can group bits in 4, like this: 0000 0000 0000 0000 (B-2)



(B-2) The minimum binary value represented by a word

  • Is 0000 0000 0000 0000



(B-2) The maximum binary value represented by a word

  • Is 1111 1111 1111 1111



The minimum decimal value of a word

  • Is 0



To find out the maximum decimal value of a word

  • You can use the base 2 formula, filling out each bit with 1 (B-3):



Example of (B-3)

  • 1*215+1*214+1*213 + 1*212 + 1*211 + 1*210 + 1*29 + 1*28 + 1*27 + 1*26 + 1*25 + 1*24 + 1*23 + 1*22 + 1*21 + 1*20
  • = 32768 + 16384 + 8192 + 4096 + 2048 + 1024 + 512 + 256 + 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1
    = 65535



The minimum hexadecimal value you can store in a word

  • Is 0×0000000000000000 (B-4)



(B-4) This is also represented

  • As 0×00000000, or 0×0000, or 0×0
  • All these numbers produce the same value, which is 0×0



 To find out the maximum hexadecimal number you can store in a word

  • Replace every group of 4 bits with an f or F (Image-3)



(Image-3)

The maximum hexadecimal number you can store in a word



Counting on base and extending the table we used earlier

  • We would get (Image-4)



(Image-4)

Counting on base and extending the table


Discussion

No comments for “Representing a Word”

Post a comment