MedVision ad

Tricky questions, quite difficult for me :p (1 Viewer)

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Alright one of the teachers at school provided me with some questions he had on his laptop, thanks to him. I'm stuck on quite a few so here goes...


1) Explain why there are different method of representing chars sets on different computers, i.e. EBCDIC, 7 Bit ASCII, 8 Bit ASCII, Hex, BCD.

First of all i never knew there was 8 bit ASCII what's the difference in that? i Thought that's why EBCDIC was created , because it's 8bits. Also do we need to know about EBCDIC?


2) Explain the reason that computers use ASCII code to communicate between devices. Identify advs and disadvs of using ASCII code

3) What is the largest positive integer that can be represented by a 4-Bit two's complement code?

4) Explain the diff between representation of 0 base 10 (decimal) in 4 bit one's complement code and in 4 bit two's complement code

5) On a 3 bit two's complement system, the operation 5 base 10 minus 1 base 10 cannot be performed. Briefy explain why, illustrate your answer using binary representation of the process.

6) How is the EBCDIC coding method derived from the BCD coding method? How does it differ from the BCD coding method?

7) Give reason why the modern computing is based on the binary number system

8) A computer has a word length of 8 binary digits and uses two's complement. Translate each of the following numbers into the form the computer would understand.

i) 42
ii) -42

9) represent 23 by EBCDIC coding method

10) Assuming that an 8-bit two's complement system is used, find the decimal equivalent of the binary number 11111000

That's it for now :D
 

enak

Limbo
Joined
Oct 18, 2002
Messages
1,046
Location
Sydney
Gender
Undisclosed
HSC
N/A
1: 8-bit ASCII is the extended set resulting in up to 255 characters reserved for foreign language characters etc. Not exactly sure how to answer the whole question

2: ASCII is ISO standarD isnt it?

3: cbf doing that :p

4:see 3

5:erm, do we convert it to binary first? or do a decimal twos compliment?

6: Not sure, EBCDIC isn't really covered in teh course

7: Punch card system i think.

8: convert to binary and do a twos compliment

9: NFI on EBCDIC

10: simple conversion of binary to decimal
 

chris42

Member
Joined
Oct 4, 2003
Messages
649
Location
Sydney
Gender
Male
HSC
2004
Originally posted by Winston

1) Explain why there are different method of representing chars sets on different computers, i.e. EBCDIC, 7 Bit ASCII, 8 Bit ASCII, Hex, BCD.

First of all i never knew there was 8 bit ASCII what's the difference in that? i Thought that's why EBCDIC was created , because it's 8bits. Also do we need to know about EBCDIC?
As know I learned EBCDIC in year 11, so I guess we would need to know about it in the HSC. But I don't think we need to know any more than the fact it has taken over ASCII, in thats its 8 bits to ASCII 7, which allows us to have complex characters on the keyboard, primarily for different languages, i.e. Chinese, Japanese
 

-X-

Member
Joined
Aug 10, 2003
Messages
481
Gender
Undisclosed
HSC
N/A
I'll have a go at question 3.

The max combination of binary numbers would = 2^4 = 16. Now, 2's complement, would represnt -8 to +7 (16 different combinations including 0). This means that the largest positvie integer = +7....

Correct me if im wrong though....Im known to get these wrong (usually the error is +-1). :p
 
Last edited:

enak

Limbo
Joined
Oct 18, 2002
Messages
1,046
Location
Sydney
Gender
Undisclosed
HSC
N/A
Max on binary in a 4-bit system in 2^4 - 1, 1111(base2) = 15(base10) :)

Looks like i'll have to look at binary again tomorro.

In two's compliment, the sign bit is NOT part of the binary integer right? If so -X- is correct
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Ok i got two more questions


1) If given a truth table, and they require you to construct a circuit how on earth can u go about doing it besides trial and error? :S.... Like there would be two types of it, one of it is giving you a Truth Table, with results and just complete a circuit to satisfy such results, or the other one will be telling you to use two or three certain logic gates to construct another form of a logic gate e.g. use a NOT gate and AND gates to create a OR gate.


2) In the excel text book for revision set question they ask this weird question associated with black box and whitebox in reference to flip flops i soooo don't get how to read these, where they have like 8 flip flops joined together and they ask this mutulated question lol.


Thanks guys.
 

saves.the.day

Member
Joined
Oct 29, 2003
Messages
233
Location
Castle Hill
Gender
Undisclosed
HSC
2003
1)
ASCII was the first to come out in 1960's using 7 bits to represent data allowing a total of 128 characters/numbers/letters to be made. It set a standard so that computers of different types could follow this and a letter A on one computer would result in the same letter A on another.
Later on, it became obvious that 7 bit was far too little so they stepped it up to 8 bit ASCII to provide a total of 256 characters. 8 Bit ASCII still used the same standard though.
BCD or binary coded decimal is a nibble of data. It has 4 bits used in data representation.
EBCIDIC uses 8 bits to store data, however, it was an extension of BCD (binary coded decimal) and was different to ASCII 8 bit as EBCIDIC simply continued on from BCD so a binary code in EBCIDIC for the number 12 would be different to the ASCII 8 bit code for the number 12.
Hex or hexadecimal code is code that uses the binary code, converts it into two nibbles (i.e. takes the 8 bits and sepereates them at the middle to get two nibbles of 4 bits) and then converts each nibble (nibble is 4 bits) to a hex code. Hexadecimal goes from 0-9 then from A-F. An example is the binary number of 10100101 can be split into two 1010 and 0101 and each nibble is now converted to a ASCII code. 1010 = 10 (therefore the letter A as remember we go from 0 to 9 then from A to F) and then 0101 = 5
Therefore 10100101 in hexadecimal is A5
The question said to explain why there is a difference so the reason we use this is because programmers required a higher level to code in instead of 0's and 1's so this made it a little easier, increasing efficiency 8 fold.


2) The reason computers use ASCII code is because it set a standard. That the ASCII 7 bit code of the number 3 i.e. 0000011 would result in the same number 3 on another machine. For example, if we placed 0000011 into another machine that doesn't use ASCII (say, a computer using EBCIDIC) we would probably get a different number/character/ letter. ASCII set up a standard so the same files on one computer can be read on another.

The disadvantages of using such a system is that it involved locking the system into using 8 bits and it also locked the computer into the current ASCII arrangement that it is in today. This reduces the flexibility but adds to consistency.

3)
For this you first work out 2^4 = 16
Now divide by 2 = 8 (for the one's comlement that removes half our binary values to make them negatives)
Now add one = 9 (as by adding 1 the difference from ones complement to two's complement is that this addition of 1 will remove the option of a positive and negative 0)
so just do:
1) 0000
2) 0001
3) 0010
4) 0011
5) 0100
6) 0101
7) 0110
8) 0111
9) 1000

(we get this by adding one each time) Now get the 9th number of 1000 and convert to decimal. ie the number in binary is 8

4) Like i said in the previous question, a representation in ones complement is that it allows for a negative and positive 0.
In twos complement, it adds one so it removes this probability of a positive and negative 0.

5)
5 in binary = 101
010 in ones complement
011 in twos complement

1 in binary = 001
110 in ones complement
111 in two's complement

011-
111
ans = cannot do!

Ok the reason this cannot be performed in "3 bit two's complement system" is that we cannot minus the two. When minusing, we NEED to convert one of the digits to a complement. This is because it works on the principal that
x + y = x + (-y)

Here we just convert y to its ones or twos complement.
On a 3 bit two's complement system, the operation 5 base 10 minus 1 base 10 cannot be performed. Briefy explain why, illustrate your answer using binary representation of the process.

6) EBCIDIC just uses 8 bits instead of 4 bits for decimal representation. It is derived from BCD in the way that it just carries on from the final BCD digit of 1111 and makes this a 00001111 so now there can be 128 more possibilities

7) Computer hardware works in a series of switches that can be either turned off or on. This is carried on from the 1950's method of using diodes: devices that work off thermionic emmissions (you dont need to know this, i'm just being a smart ass because i learnt this in physics). Well since these devices work in a state of off or on, they can be represented by 0's and 1's.

8)

i) 101010
ii) 010110

9)never knew we had to know EBCIDIC representation? I highly doubt this question in the HSC

10) Get number
11111000
minus 1 (yuk! but oh well here it is)
11110111
Now do a ones complement reversal (fancy way of saying work backwards)
to get...
00001000


I hope this helps you out. Sorry I could not answer question 9 but I doubt this question in the HSC. I looked at the syllabus and EBCDIC is not there for representation so I personally will not be learning its representation. Good luck with HSC.
 

leeraff

Member
Joined
Sep 11, 2003
Messages
63
Gender
Male
HSC
2004
all that crap about ASCII. Do we need to know it? If so can someone direct me to the dot point on the syllabus. thx
 

saves.the.day

Member
Joined
Oct 29, 2003
Messages
233
Location
Castle Hill
Gender
Undisclosed
HSC
2003
Originally posted by leeraff
all that crap about ASCII. Do we need to know it? If so can someone direct me to the dot point on the syllabus. thx
represents data within the computer: character representation, nameley ascii and hexadecimal.
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
thank you all and saves.the.day for the responses could u also answer my last two ques i posted in the middle of the thread


Ok i got two more questions


1) If given a truth table, and they require you to construct a circuit how on earth can u go about doing it besides trial and error? :S.... Like there would be two types of it, one of it is giving you a Truth Table, with results and just complete a circuit to satisfy such results, or the other one will be telling you to use two or three certain logic gates to construct another form of a logic gate e.g. use a NOT gate and AND gates to create a OR gate.


2) In the excel text book for revision set question they ask this weird question associated with black box and whitebox in reference to flip flops i soooo don't get how to read these, where they have like 8 flip flops joined together and they ask this mutulated question lol.


Thanks guys.
 

SamD

Member
Joined
Jul 21, 2002
Messages
256
Gender
Male
HSC
N/A
Originally posted by Winston

1) If given a truth table, and they require you to construct a circuit how on earth can u go about doing it besides trial and error? :S.... Like there would be two types of it, one of it is giving you a Truth Table, with results and just complete a circuit to satisfy such results, or the other one will be telling you to use two or three certain logic gates to construct another form of a logic gate e.g. use a NOT gate and AND gates to create a OR gate.
Lets do this using an example, say the truth table was:

A B Output
0 0 1
0 1 0
1 0 1
1 1 0

Some steps to do this:
1. Consider each set of inputs that lead to a true output.

In the example this is the first and third rows.

2. Write each of these using NOT each time there is a 0 and with an AND between.

For row 1 you get (NOT(A) AND NOT(B))
For row 3 you get (A AND NOT(B))

3. Join each of the expressions from 2. with an OR

In our example you get (NOT(A) AND NOT(B)) OR (A AND NOT(B)). This represents one possible answer, not the most precise but still it will work.
Here's a graphic of the circuit
http://www.blizzardhacks.net/upload/images3/gates.1067845522.jpg

4. Simplify the expression (this is where knowing boolean algebra laws really helps. Essentially AND is like * and OR is like +.

In our example we can take NOT(B) out as a common factor, so:
(NOT(A) AND NOT(B)) OR (A AND NOT(B))
=NOT(B) AND (NOT(A) OR A)

Now (NOT(A) OR A) is always true so it has no effect on the AND
=NOT(B)
Check out the truth table, A has no effect so its really just a NOT gate attached to the B input.

HTH
Sam

PS. Winston I really don't have any idea what your second question was asking!!!!
 

-X-

Member
Joined
Aug 10, 2003
Messages
481
Gender
Undisclosed
HSC
N/A
hmm ok bool. algebra sounds usefull. I guess i'll learn it. Thanks SamD.
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Originally posted by SamD
Lets do this using an example, say the truth table was:

A B Output
0 0 1
0 1 0
1 0 1
1 1 0

Some steps to do this:
1. Consider each set of inputs that lead to a true output.

In the example this is the first and third rows.

2. Write each of these using NOT each time there is a 0 and with an AND between.

For row 1 you get (NOT(A) AND NOT(B))
For row 3 you get (A AND NOT(B))

3. Join each of the expressions from 2. with an OR

In our example you get (NOT(A) AND NOT(B)) OR (A AND NOT(B)). This represents one possible answer, not the most precise but still it will work.
Here's a graphic of the circuit
http://www.blizzardhacks.net/upload/images3/gates.1067845522.jpg

4. Simplify the expression (this is where knowing boolean algebra laws really helps. Essentially AND is like * and OR is like +.

In our example we can take NOT(B) out as a common factor, so:
(NOT(A) AND NOT(B)) OR (A AND NOT(B))
=NOT(B) AND (NOT(A) OR A)

Now (NOT(A) OR A) is always true so it has no effect on the AND
=NOT(B)
Check out the truth table, A has no effect so its really just a NOT gate attached to the B input.

HTH
Sam

PS. Winston I really don't have any idea what your second question was asking!!!!
Thanks for that Sam, alright sorry this was the question silly me


Using the half adder and full adder as a black box, create a logic circuit to add two 4 bit binary numbers together

IM LIEK WHAT?! wats black box got to do with that

and also check out question 25 C (II) of the 2001 CSSA SDD Trial paper, that's crazy

here's the link to the paper


http://www.boredofstudies.org/courses/techsci/sdd/CSSA_SDD_2001_sol.zip
 

-X-

Member
Joined
Aug 10, 2003
Messages
481
Gender
Undisclosed
HSC
N/A
I think for that question, all you do is draw squares representing a 1/2 adder and full adder with the inputs / inputs.
 
Last edited:

SamD

Member
Joined
Jul 21, 2002
Messages
256
Gender
Male
HSC
N/A
Originally posted by -X-
I think for that question, all you do is draw squares representing a 1/2 adder and full adder with the inputs / inputs.
Sort of, by black box it just means draw a rectangle, with the inputs and outputs.

To add 2 four bit numbers you'll need 1 half adder and 3 full adders. The half adder comes first as it doesn't have a carry in. Finally connect all the carry outs to the next adders carry in.

The first 4 bit number is input at all the A inputs and the second one at all the B inputs.

(Its just like the 8 bit adder on page 361 of my text, except the first adder only needs to be a half adder, and then there's only three full adders).
 

saves.the.day

Member
Joined
Oct 29, 2003
Messages
233
Location
Castle Hill
Gender
Undisclosed
HSC
2003
Damn SamD beat me to it! Well the answer is actually in the excel book on page 293 and as SamD said, you just draw rectangles to represent the adders. Why? Becasue you are looking at it from the black box perspective (output/input) so no processing is important at this stage.

and also check out question 25 C (II) of the 2001 CSSA SDD Trial paper, that's crazy
Winston, that is simply the flip flop in a black box version. In effect it is just a picture of 8 flip flops numbered 0-7. If you look at C part I you'll see that it shows the flip flop and says "is represented by" then shows a black box version of the flip flop.

So you simply talk about how the 8 flip flops work as a memory store to store 8 bits of data.

Hope this helps.
 
Last edited:

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Thanks Sam and saves.the.day

@ saves.the.day i got a query to one of ur answers


For this you first work out 2^4 = 16
Now divide by 2 = 8 (for the one's comlement that removes half our binary values to make them negatives)
Now add one = 9 (as by adding 1 the difference from ones complement to two's complement is that this addition of 1 will remove the option of a positive and negative 0)
so just do:
1) 0000
2) 0001
3) 0010
4) 0011
5) 0100
6) 0101
7) 0110
8) 0111
9) 1000


i'm not gettin it

why do we divide it by 2 ?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top