Pseudocode: Difference between revisions

From Computer Science Wiki
No edit summary
Line 44: Line 44:
== What you must know ==  
== What you must know ==  


You must be able to correctly answer the following questions:  
You must be able to correctly answer the following questions:
 
<div class="toccolours mw-collapsible mw-collapsed">
Define the term:  '''bit''' Click the expand link to see the answer, but make sure you have tried to answer first!--->
<div class="mw-collapsible-content">
<code>A bit is the basic unit of information in computing and digital communications</code>.  A bit can have only one of two values, and may therefore be physically implemented with a two-state device. These values are most commonly represented as either a 0 or 1. The term bit is a portmanteau of binary digit.<ref>https://en.wikipedia.org/wiki/Bit</ref>
</div>
</div>
 
 
 
<div class="toccolours mw-collapsible mw-collapsed">
Define the term:  '''byte''' Click the expand link to see the answer, but make sure you have tried to answer first!--->
<div class="mw-collapsible-content">
<code>The byte is a unit of digital information that most commonly consists of eight bits</code>. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit of memory in many computer architectures. The size of the byte has historically been hardware dependent and no definitive standards existed that mandated the size. The de facto standard of eight bits is a convenient power of two permitting the values 0 through 255 for one byte. The international standard IEC 80000-13 codified this common meaning. Many types of applications use information representable in eight or fewer bits and processor designers optimize for this common usage. The popularity of major commercial computing architectures has aided in the ubiquitous acceptance of the 8-bit size.<ref>https://en.wikipedia.org/wiki/Byte</ref>
</div>
</div>
 
 
<div class="toccolours mw-collapsible mw-collapsed">
Define the term:  '''binary''' Click the expand link to see the answer, but make sure you have tried to answer first!--->
<div class="mw-collapsible-content">
<code>In mathematics and digital electronics, a binary number is a number expressed in the binary numeral system or base-2 numeral system which represents numeric values using two different symbols: typically 0 (zero) and 1 (one).</code><ref>https://en.wikipedia.org/wiki/Binary_number</ref>
</div>
</div>
 
 
<div class="toccolours mw-collapsible mw-collapsed">
Define the term:  '''denary/decimal''' (they refer to the same thing) Click the expand link to see the answer, but make sure you have tried to answer first!--->
<div class="mw-collapsible-content">
<code>Denary, also known as "decimal" or "base 10," is the standard number system used around the world. It uses ten digits (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) to represent all numbers.</code><ref>techterms.com/definition/denary</ref>
</div>
</div>
 
 
<div class="toccolours mw-collapsible mw-collapsed">
Define the term:  '''hexadecimal''' Click the expand link to see the answer, but make sure you have tried to answer first!--->
<div class="mw-collapsible-content">
<code>In mathematics and computing, hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. </code> It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a, b, c, d, e, f) to represent values ten to fifteen.<ref>https://en.wikipedia.org/wiki/Hexadecimal</ref>
</div>
</div>
 
[[Media:Binary conversion.pdf | Click here to test yourself]]


== Why is this so important? ==
== Why is this so important? ==

Revision as of 11:38, 4 May 2016

Exclamation.png This is an important concept you should fully understand this.

This is a basic concept in computer science

In mathematics and digital electronics, a binary number is a number expressed in the binary numeral system or base-2 numeral system which represents numeric values using two different symbols: typically 0 (zero) and 1 (one). The base-2 system is a positional notation with a radix of 2. Because of its straightforward implementation in digital electronic circuitry using logic gates, the binary system is used internally by almost all modern computers and computer-based devices. Each digit is referred to as a bit.[1]


Binary[edit]

This is one of the better videos I've seen on binary.


Binary Translation table[edit]

I find it helpful to draw this table when I must convert binary to base 10. It also helps when looking at the video above.

128 64 32 16 8 4 2 1

How to add two binary numbers[edit]

Adding binary is straight forward. Line up the numbers as you would if you were adding base-10 numbers.

Remember this:

0 + 0 = 0

0 + 1 = 1

1 + 0 = 1

1 + 1 = 10, so write a 0 and carry the 1 to the next column.

What you must know[edit]

You must be able to correctly answer the following questions:

Why is this so important?[edit]

If we can represent numbers as 1 and 0, why not represent numbers as on and off? If we can represent letters as numbers (A = 65, B = 66) couldn't we also say A = 01000001 and B = 01000010?

Binary representation is the essence of how computers work.




References[edit]