100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Examen

Binary and Hex Worksheet IB / A level Computer Science (Answers)

Puntuación
-
Vendido
-
Páginas
6
Grado
A+
Subido en
22-03-2025
Escrito en
2024/2025

Exam of 6 pages for the course Computer Science at Abacus College, Oxford (answers)

Institución
Grado









Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
Estudio
Desconocido
Grado

Información del documento

Subido en
22 de marzo de 2025
Número de páginas
6
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

Page: 1 of 6

Student name:

Addition in Binary and Hexadecimal
Binary addition has four basic rules, the first 3 of which are pretty obvious:

0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 carry 1.


Example 1:


0 1 0 0 1 1 0 1
+ 0 0 0 0 0 1 1 0
carry -> 1 1
result -> 0 1 0 1 0 0 1 1


If you are adding in columns and you have to do 1 + 1 + carry then the result will be 1 carry 1 to the
next column:


0 0 0 0 1 1 1 1
+ 0 0 0 0 0 1 1 0
carry -> 1 1 1
result -> 0 0 0 1 0 1 0 1


Confirm that these additions are correct by converting the numbers to base 10. Try these:

1 0 0 0 1 0 1 0
+ 0 0 0 1 1 1 0 1
carry -> 1
result -> 1 0 1 0 0 1 1 1

1 1 0 0 1 1 1 1
+ 0 0 1 0 0 0 1 1
carry -> 1 1 1 1
result -> 1 1 1 1 0 0 1 0

1 1 1 1 0 0 0 1
+ 0 0 0 0 1 1 1 1
carry -> 1 1 1 1 1 1 1
result -> 0 0 0 0 0 0 0 0

© 2007 Richard Jones, PO BOX 246, Cambridge, New Zealand. See: http://www.ib-computing.com/ for more worksheets

, Page: 2 of 6

Student name:
What happened in the last example?
We ran out of bits to show the result of the sum.
-----------------------------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------------------------

This is known as “overflow”.

Imagine now that the three examples given above are in two’s complement form (the last value is the
same magnitude but negative – ie -128).

Convert to decimal and see what the examples tell you. Comment on the last example again:

-----------------------------------------------------------------------------------------------------------------
Adding those two numbers result in zero/overflow.
-----------------------------------------------------------------------------------------------------------------

We conclude that when subtracting two numbers by adding a two’s complement form positive number
to a two’s complement form negative number, that any overflow beyond the MSB can be ignored. This
is not true, of course, for addition.

Consider two hexadecimal numbers:

0 0 1 A
0 2 0 9
carry -> 1
result -> 0 2 2 3

When we add the first column 9 + A we clearly go beyond F – the largest hex symbol we can have. I
got three by starting my left-hand thumb at A and then counting round 9 fingers (not forgetting 0) to
get the 3. Then of course we need to carry to the next column.

This is a bit tricky if you have to add, say C and D – you need more than 10 fingers (unless you can
“wrap around” of course.

The easiest way (I find) is to write down the numbers on a peice of paper (which you can do in the
exam – remembering you won’t have a calculator with you), and count around:

For example to add C to D:

0 1 2 3 4 5 6 7 8 9 A B C D E F
start
here

Now, count around 1 on D, 2 on E, 3 on F, 4 on 0 and so on, until you count to D; you should end up
on 9.

© 2007 Richard Jones, PO BOX 246, Cambridge, New Zealand. See: http://www.ib-computing.com/ for more worksheets
$4.12
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor
Seller avatar
BobQ2

Documento también disponible en un lote

Conoce al vendedor

Seller avatar
BobQ2 Abacus College, Oxford
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
0
Miembro desde
9 meses
Número de seguidores
0
Documentos
10
Última venta
-
IB Resource Hub

0.0

0 reseñas

5
0
4
0
3
0
2
0
1
0

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes