Diffie-Hellman - Exchange key confusion from different books

I got confused when I tried to read these three books, my confusion about choosing the two numbers

“Cryptography and Network Security “ by William Stallings page 295:

Quote:

G Prime number

N such N < G and N a primitive root of G

“TCP/IP Protocol Suite” book by Forouzan Page 741:

Quote:

The tow parities need to choose two numbers G and N. The first number, G is a large prime number with the restriction that (G-1)/2 must also be prime number, the second number N is also prime number, __but is has more restriction__.

“Fundamentals of Network Security “ book by Eric Maiwald page 342

Quote:

Party1 one and Party2 agree on two large integer G and N such that 1< G <N

N and (N-1)/2 should both be prime numbers and at least 512 bits in length

__Queries :__

1-One book says primitive root and other book says: number minus 1 divided by 2

2- How can I find that the prime number which has been chosen is 512 bits or bigger ?