BBS: Inland Empire Archive Date: 03-27-93 (19:42) Number: 356 From: EARL MONTGOMERY Refer#: NONE To: ALL Recvd: NO Subj: HEX-BIN.DOC Conf: (2) Quik_Bas
Final part of two parts Msg#: 2 >>>>>> Continued from last message: HEX-BIN.DOC >>>>>>> Moving left again 8 X 1 = 8 Moving left again 16 X 0 = 0 Moving left again 32 X 0 = 0 Moving left again 64 X 0 = 0 Moving left again 128 X 1 = 128 And 1 + 0 + 0 + 8 + 0 + 0 + 0 + 128 = 137 Logical Operators <AND> <OR> When you AND two numbers the results are in a new third number. For example: a = 137 b = 105 c = a AND b 1 0 0 0 1 0 0 1 This represents A <137> 0 1 1 0 1 0 0 1 This represents B <105> 0 0 0 0 1 0 0 1 This represents C <9> What occurs when you AND two numbers is that the computer compares the bits within the first number against the bits in the second number. If the bits are the same then they will remain the same in the third number. If they are not the same then the equivalent bits will be 0 in the third number. "Logical OR What occurs when you OR two numbers is that the computer compares the bits within the first number against the bits in the second number. If the bits are the same they will remain the same in the third number. If they are not the same then the bits will be 1 in the third number. For example: A=122 B=15 C=A OR B 0 1 1 1 1 0 1 0 This represents A <122> 0 0 0 0 1 1 1 1 This represents B <15> 0 1 1 1 1 1 1 1 This represents C <127> This quick little reference document composed by Earl Montgomery I hope it proves to be of some use to you. 8<------8<--------8<-------8<---- Snip ends! Message polishing/splitting was done by MSGSPLIT 1.0, a Victor Yiu creation. --- Maximus 2.01wb * Origin: Rabbit and Snake's BBS - Richardson, Texas (1:124/6108)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET