Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Understanding Binary data types

Author  Topic 

Rock_query
Yak Posting Veteran

55 Posts

Posted - 2013-07-22 : 20:57:23
I am trying to understand Binary and varBinary data types.

Examples of binary data types are given on the MS page as

0h202020 and 0h6ABCDEF. The "bi" in binary implies 2. These have more than 2 digits so I am confused as to how these are recognized as binary values.

1. What exactly are binary values?
2. Why use binary values given how complicated they look?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2013-07-22 : 21:02:56
The values are binary but REPRESENTED in hexadecimal.



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page

Rock_query
Yak Posting Veteran

55 Posts

Posted - 2013-07-23 : 13:09:38
quote:
Originally posted by SwePeso

The values are binary but REPRESENTED in hexadecimal.



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA



Although they are binary represented in hexadecimal, what would the actual binary values look like?
Go to Top of Page

Rock_query
Yak Posting Veteran

55 Posts

Posted - 2013-07-23 : 13:10:22
quote:
Originally posted by Rock_query



If anybody can answer these questions, I would appreciate it.

1. What exactly are binary values?
2. Why use binary values given how complicated they look?



Go to Top of Page

MuMu88
Aged Yak Warrior

549 Posts

Posted - 2013-07-23 : 13:13:51
0h202020 = 1000000010000000100000 & 0h6ABCDEF = 110101010111100110111101111
quote:
Originally posted by Rock_query

quote:
Originally posted by SwePeso

The values are binary but REPRESENTED in hexadecimal.



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA



Although they are binary represented in hexadecimal, what would the actual binary values look like?

Go to Top of Page

MuMu88
Aged Yak Warrior

549 Posts

Posted - 2013-07-23 : 13:39:09
http://nookkin.com/articles/computer-science/why-computers-use-binary.ndoc


quote:
Originally posted by Rock_query

quote:
Originally posted by Rock_query



If anybody can answer these questions, I would appreciate it.

1. What exactly are binary values?
2. Why use binary values given how complicated they look?





Go to Top of Page

Rock_query
Yak Posting Veteran

55 Posts

Posted - 2013-07-24 : 17:42:13
quote:
Originally posted by MuMu88

0h202020 = 1000000010000000100000 & 0h6ABCDEF = 110101010111100110111101111
quote:
Originally posted by Rock_query

quote:
Originally posted by SwePeso

The values are binary but REPRESENTED in hexadecimal.



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA



Although they are binary represented in hexadecimal, what would the actual binary values look like?





Thank you MuMu88.
Go to Top of Page

Rock_query
Yak Posting Veteran

55 Posts

Posted - 2013-07-24 : 17:55:20
quote:
Originally posted by MuMu88

http://nookkin.com/articles/computer-science/why-computers-use-binary.ndoc


quote:
Originally posted by Rock_query

quote:
Originally posted by Rock_query



If anybody can answer these questions, I would appreciate it.

1. What exactly are binary values?
2. Why use binary values given how complicated they look?









Good article. Thank you.
Go to Top of Page
   

- Advertisement -